tag: 1.2
commit ce9076d3056f4ca01a1456a9f64e231ea6f73701
Author: João Távora <[email protected]>
Commit: João Távora <[email protected]>
Close #82: Correctly delete text before expanding snippet completions
Suggested by Amol Mandhane.
* eglot.el (eglot-completion-at-point): Use length of obj in
:exit-function
---
eglot.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eglot.el b/eglot.el
index eba1b1d..7587164 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1464,7 +1464,7 @@ is not active."
(text-properties-at 0 obj)
(when-let ((fn (and (eql insertTextFormat 2)
(eglot--snippet-expansion-fn))))
- (delete-region (car bounds) (point))
+ (delete-region (- (point) (length obj)) (point))
(funcall fn insertText))
(eglot--signal-textDocument/didChange)
(eglot-eldoc-function)))))))