Skip to content

Commit 5dc9956

Browse files
committed
chore: cancel-with-input is no longer needed
With the lsp-inline-completion--keep method, we no longer need the cancel with input method -- simply let the binding on some other keymap be found and cancel the completion in the pre-command-hook
1 parent 4029ad0 commit 5dc9956

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

lsp-inline-completion.el

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ should not cancel the inline completion UI"
9797
(lsp-inline-completion--define-key map [down-mouse-1] #'ignore 'keep)
9898
(lsp-inline-completion--define-key map [up-mouse-1] #'ignore 'keep)
9999
(lsp-inline-completion--define-key map [mouse-movement] #'ignore 'keep)
100-
;; Any event outside of the map, cancel and use it
101-
(define-key map [t] #'lsp-inline-completion-cancel-with-input)
102100
map)
103101
"Keymap active when showing inline code suggestions.
104102
@@ -345,15 +343,6 @@ The functions receive the inserted text and the range that was updated by the co
345343
(goto-char lsp-inline-completion--start-point)
346344
(run-hooks 'lsp-inline-completion-cancelled-hook))))
347345

348-
349-
(defun lsp-inline-completion-cancel-with-input (event)
350-
"Cancel the inline completion and executes whatever event was received."
351-
(interactive (list last-input-event))
352-
353-
(lsp-inline-completion-cancel)
354-
355-
(setq unread-command-events (nconc unread-command-events (list event))))
356-
357346
(defun lsp-inline-completion-next ()
358347
"Display the next inline completion."
359348
(interactive)

0 commit comments

Comments
 (0)