]> git.eshelyaron.com Git - emacs.git/commitdiff
Handle empty actions array in window/showmessagerequest
authorJoão Távora <joaotavora@gmail.com>
Fri, 26 Feb 2021 18:49:59 +0000 (18:49 +0000)
committerJoão Távora <joaotavora@gmail.com>
Fri, 26 Feb 2021 18:49:59 +0000 (18:49 +0000)
* eglot.el (eglot-handle-request window/showMessageRequest):
Handle empty actions.

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

lisp/progmodes/eglot.el

index 851f2e68ef90fd2efe0cd54416ab80c8a19c75a0..98a1059e1576953f208572c661c523b0bfe3ed3f 100644 (file)
@@ -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))