Skip to content

Commit

Permalink
Copy the returned all-completions list
Browse files Browse the repository at this point in the history
Copy the returned all-completions list so that it could be later
destructively modified by the completion UI.
  • Loading branch information
lapinskim committed Jan 6, 2023
1 parent 992e3f3 commit bd3d07d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/sly-completion.el
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,13 @@ ANNOTATION) describing each completion possibility."
(display-sort-function . identity)
(category . sly-completion)))
;; all completions
(`t (car (all)))
(`t (copy-sequence (car (all))))
;; try completion
(`nil (try))
(`(try-completion . ,point)
(cons 'try-completion (cons string point)))
(`(all-completions . ,_point) (cons 'all-completions (car (all))))
(`(all-completions . ,_point) (cons 'all-completions
(copy-sequence (car (all)))))
(`(boundaries . ,thing)
(completion-boundaries string (all) pred thing))

Expand Down

0 comments on commit bd3d07d

Please sign in to comment.