From a6229c50e8e00b895eed733f2626e6209043f504 Mon Sep 17 00:00:00 2001 From: Theodor Thornhill Date: Wed, 3 Mar 2021 11:08:24 +0100 Subject: [PATCH] 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 --- lisp/progmodes/eglot.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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))))) -- 2.39.2