emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/eglot 8dc518045c: Fix #851: Prevent empty Diagnostic ta


From: ELPA Syncer
Subject: [elpa] externals/eglot 8dc518045c: Fix #851: Prevent empty Diagnostic tags vector hiding main fontification
Date: Wed, 2 Mar 2022 05:57:29 -0500 (EST)

branch: externals/eglot
commit 8dc518045c017f09b26d9baf0d002439b2481b2c
Author: Brian Leung <leungbk@posteo.net>
Commit: João Távora <joaotavora@gmail.com>

    Fix #851: Prevent empty Diagnostic tags vector hiding main fontification
    
    * eglot.el (eglot-handle-notification): Require that the resulting
    list of faces is non-empty and that each face corresponds only to a
    known tag.
    
    For unknown tags, we don't pass any additional face information to
    Flymake, and instead expect it to make the appropriate overlay with
    the "severity" property of the Diagnostic.
    
    Co-authored-by: João Távora <joaotavora@gmail.com>
---
 eglot.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/eglot.el b/eglot.el
index 5a0a8caba4..3f84b3b7a2 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1866,11 +1866,11 @@ COMMAND is a symbol naming the command."
                         (current-buffer) beg end
                         (eglot--diag-type severity)
                         message `((eglot-lsp-diag . ,diag-spec))
-                        (and tags
-                             `((face
-                                . ,(mapcar (lambda (tag)
-                                             (alist-get tag eglot--tag-faces))
-                                           tags)))))))
+                        (when-let ((faces
+                                    (cl-loop for tag across tags
+                                             when (alist-get tag 
eglot--tag-faces)
+                                             collect it)))
+                          `((face . ,faces))))))
            into diags
            finally (cond (eglot--current-flymake-report-fn
                           (eglot--report-to-flymake diags))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]