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

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

[elpa] externals/eglot 38da3d3 15/26: Fix #159: Properly clear old diagn


From: João Távora
Subject: [elpa] externals/eglot 38da3d3 15/26: Fix #159: Properly clear old diagnostics when making new ones
Date: Sun, 9 Dec 2018 19:11:27 -0500 (EST)

branch: externals/eglot
commit 38da3d3b31ee19a5cea03951f5c535750858aaac
Author: Michał Krzywkowski <address@hidden>
Commit: Michał Krzywkowski <address@hidden>

    Fix #159: Properly clear old diagnostics when making new ones
    
    * eglot.el (eglot-handle-notification
      textDocument/publishDiagnostics): Call flymake report function with
      :region.
---
 eglot.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/eglot.el b/eglot.el
index 2e99fc0..86db5ea 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1313,7 +1313,13 @@ COMMAND is a symbol naming the command."
                                        message `((eglot-lsp-diag . 
,diag-spec)))))
          into diags
          finally (cond ((and flymake-mode eglot--current-flymake-report-fn)
-                        (funcall eglot--current-flymake-report-fn diags)
+                        (funcall eglot--current-flymake-report-fn diags
+                                 ;; If the buffer hasn't changed since last
+                                 ;; call to the report function, flymake won't
+                                 ;; delete old diagnostics.  Using :region
+                                 ;; keyword forces flymake to delete
+                                 ;; them (github#159).
+                                 :region (cons (point-min) (point-max)))
                         (setq eglot--unreported-diagnostics nil))
                        (t
                         (setq eglot--unreported-diagnostics (cons t diags))))))



reply via email to

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