emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/eglot 74240c7 66/69: Protect against zero-length comple


From: João Távora
Subject: [elpa] externals/eglot 74240c7 66/69: Protect against zero-length completions
Date: Sun, 20 Oct 2019 08:21:55 -0400 (EDT)

branch: externals/eglot
commit 74240c7dae22716c6925341d0e76fdc76f37190f
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>

    Protect against zero-length completions
    
    Apparently the Vue Language Server sends such things (see #319).
    
    * eglot.el (eglot-completion-at-point): Protect against
    zero-length completions.
---
 eglot.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/eglot.el b/eglot.el
index aa64fe6..cba8c34 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1907,7 +1907,8 @@ is not active."
                                     (string-trim-left label))
                                    (t
                                     (or insertText (string-trim-left 
label))))))
-                        (put-text-property 0 1 'eglot--lsp-item item proxy)
+                        (unless (zerop (length proxy))
+                          (put-text-property 0 1 'eglot--lsp-item item proxy))
                         proxy))
                     items))
            (bounds



reply via email to

[Prev in Thread] Current Thread [Next in Thread]