Skip to content

Commit 40719bf

Browse files
committed
Always run the cleanup to avoid stale :cancel-tokens
1 parent 135d28f commit 40719bf

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lsp-mode.el

+8-8
Original file line numberDiff line numberDiff line change
@@ -3469,14 +3469,13 @@ If NO-MERGE is non-nil, don't merge the results but return alist workspace->resu
34693469
(body (plist-put body :id id)))
34703470

34713471
;; cancel request in any of the hooks
3472-
(when hooks
3473-
(mapc (-lambda ((hook . local))
3474-
(add-hook hook
3475-
(lsp--create-request-cancel
3476-
id target-workspaces hook buf method)
3477-
nil local))
3478-
hooks)
3479-
(puthash id cleanup-hooks lsp--request-cleanup-hooks))
3472+
(mapc (-lambda ((hook . local))
3473+
(add-hook hook
3474+
(lsp--create-request-cancel
3475+
id target-workspaces hook buf method)
3476+
nil local))
3477+
hooks)
3478+
(puthash id cleanup-hooks lsp--request-cleanup-hooks)
34803479

34813480
(setq lsp--last-active-workspaces target-workspaces)
34823481

@@ -5054,6 +5053,7 @@ Others: TRIGGER-CHARS"
50545053

50555054
(advice-add #'completion-at-point :before #'lsp--capf-clear-cache)
50565055

5056+
50575057
(defun lsp--to-yasnippet-snippet (text)
50585058
"Convert LSP snippet TEXT to yasnippet snippet."
50595059
;; LSP snippet doesn't escape "{", but yasnippet requires escaping it.

0 commit comments

Comments
 (0)