From: Theodor Thornhill Date: Wed, 3 Mar 2021 10:08:24 +0000 (+0100) Subject: Correctly protect against zero-length completion items X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~159 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a6229c50e8e00b895eed733f2626e6209043f504;p=emacs.git Correctly protect against zero-length completion items 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 --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 0cb5839f6d5..610e57b5ad0 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -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)))))