]> git.eshelyaron.com Git - emacs.git/commitdiff
Correctly protect against zero-length completion items
authorTheodor Thornhill <theo@thornhill.no>
Wed, 3 Mar 2021 10:08:24 +0000 (11:08 +0100)
committerGitHub <noreply@github.com>
Wed, 3 Mar 2021 10:08:24 +0000 (10:08 +0000)
Close https://github.com/joaotavora/eglot/issues/636.

* eglot.el (eglot-completion-at-point): check for zero length string in proxy
rather than the item.

GitHub-reference: fix https://github.com/joaotavora/eglot/issues/635

lisp/progmodes/eglot.el

index 0cb5839f6d5d6b413f10741ea4deaf73824b95aa..610e57b5ad00b718a9b784e49a3bf2204a05535b 100644 (file)
@@ -2133,7 +2133,7 @@ is not active."
                                        insertText)
                                       (t
                                        (string-trim-left label)))))
-                           (unless (zerop (length item))
+                           (unless (zerop (length proxy))
                              (put-text-property 0 1 'eglot--lsp-item item proxy))
                            proxy))
                        items)))))