From: João Távora Date: Fri, 26 Feb 2021 18:49:59 +0000 (+0000) Subject: Handle empty actions array in window/showmessagerequest X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~163 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b3f31e0b657706baed13eeee2b6ae3eb1bd04049;p=emacs.git Handle empty actions array in window/showmessagerequest * eglot.el (eglot-handle-request window/showMessageRequest): Handle empty actions. GitHub-reference: fix https://github.com/joaotavora/eglot/issues/627 --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 851f2e68ef9..98a1059e157 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1572,7 +1572,8 @@ COMMAND is a symbol naming the command." (cl-defmethod eglot-handle-request (_server (_method (eql window/showMessageRequest)) &key type message actions) "Handle server request window/showMessageRequest" - (let ((label (completing-read + (let ((actions (append actions nil)) ;; gh#627 + (label (completing-read (concat (format (propertize "[eglot] Server reports (type=%s): %s" 'face (if (<= type 1) 'error))