Skip to content

Commit 03e1818

Browse files
committed
Drop :_emacsStartPoint when calling resolve
Fixes #3956
1 parent 9935703 commit 03e1818

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

lsp-completion.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ See #2675"
701701
(lsp-completion--fix-resolve-data item)
702702
(or (ignore-errors
703703
(when (lsp-feature? "completionItem/resolve")
704-
(lsp-request "completionItem/resolve" item)))
704+
(lsp-request "completionItem/resolve" (lsp-delete item :_emacsStartPoint))))
705705
item))
706706

707707
(defun lsp-completion--resolve-async (item callback &optional cleanup-fn)
@@ -711,7 +711,7 @@ The CLEANUP-FN will be called to cleanup."
711711
(lsp-completion--fix-resolve-data item)
712712
(ignore-errors
713713
(if (lsp-feature? "completionItem/resolve")
714-
(lsp-request-async "completionItem/resolve" item
714+
(lsp-request-async "completionItem/resolve" (lsp-delete item :_emacsStartPoint)
715715
(lambda (result)
716716
(funcall callback result)
717717
(when cleanup-fn (funcall cleanup-fn)))

lsp-protocol.el

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,10 @@ Allowed params: %s" interface (reverse (-map #'cl-first params)))
262262
(defun lsp-member? (from key)
263263
(when (listp from)
264264
(plist-member from key)))
265-
(defalias 'lsp-structure-p 'json-plist-p))
265+
(defalias 'lsp-structure-p 'json-plist-p)
266+
(defun lsp-delete (from key)
267+
(cl-remf from key)
268+
from))
266269
(defun lsp-get (from key)
267270
(when from
268271
(gethash (lsp-keyword->string key) from)))
@@ -279,7 +282,10 @@ Allowed params: %s" interface (reverse (-map #'cl-first params)))
279282
(when (hash-table-p from)
280283
(not (eq (gethash (lsp-keyword->string key) from :__lsp_default)
281284
:__lsp_default))))
282-
(defalias 'lsp-structure-p 'hash-table-p))
285+
(defalias 'lsp-structure-p 'hash-table-p)
286+
(defun lsp-delete (from key)
287+
(ht-remove from (lsp-keyword->string key))
288+
from))
283289

284290
(defmacro lsp-defun (name match-form &rest body)
285291
"Define a function named NAME.

0 commit comments

Comments
 (0)