Skip to content

Commit

Permalink
fix: comment bug rendering multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Mar 11, 2024
1 parent b2eb586 commit 25a4d63
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sideline-flycheck.el
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ Argument COMMAND is required in sideline backend."
(buffer (or buffer (current-buffer)))
((eq buffer (current-buffer)))
(errors (sideline-flycheck--get-errors))
;; XXX: Prevent render multiple times.
(sideline-flycheck--callback))
(let (msgs)
(dolist (err errors)
Expand All @@ -117,6 +118,7 @@ Argument COMMAND is required in sideline backend."
(ht-set sideline-flycheck--errors msg nil) ; doesn't care about value
(push msg msgs))))
(funcall sideline-flycheck--callback msgs)
;; XXX: We need to set it to `nil', or else it will render multiple times.
(setq sideline-flycheck--callback nil))))

(defun sideline-flycheck--post-command ()
Expand Down

0 comments on commit 25a4d63

Please sign in to comment.