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

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

[nongnu] elpa/diff-ansi f47e62503d 4/7: Fix bug canceling timer which ma


From: ELPA Syncer
Subject: [nongnu] elpa/diff-ansi f47e62503d 4/7: Fix bug canceling timer which may be nil
Date: Thu, 7 Jul 2022 11:58:42 -0400 (EDT)

branch: elpa/diff-ansi
commit f47e62503d77dbcadb36e9d3d0ede9242536fa89
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>

    Fix bug canceling timer which may be nil
---
 diff-ansi.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/diff-ansi.el b/diff-ansi.el
index 26cba9e660..c05e968a04 100644
--- a/diff-ansi.el
+++ b/diff-ansi.el
@@ -666,8 +666,9 @@ Store the result in TARGET-BUF when non-nil."
         (save-excursion
           (cond
             ((eq disp-beg disp-end)
-              (cancel-timer diff-ansi--ansi-color-timer)
-              (setq diff-ansi--ansi-color-timer nil))
+              (when diff-ansi--ansi-color-timer
+                (cancel-timer diff-ansi--ansi-color-timer)
+                (setq diff-ansi--ansi-color-timer nil)))
             (t
               (let ((disp-end-mark (set-marker (make-marker) disp-end)))
                 (diff-ansi--ansi-color-apply-on-region-with-bg disp-beg 
disp-end)



reply via email to

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