X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/b0aeb9e30b6f14544e74d6c2b8f6bd030705f886..16db967b0577c376f29e0d72cef8aa2e3a5a84f0:/packages/diff-hl/diff-hl-flydiff.el diff --git a/packages/diff-hl/diff-hl-flydiff.el b/packages/diff-hl/diff-hl-flydiff.el index 94dbbd7f6..7f0c6c7de 100644 --- a/packages/diff-hl/diff-hl-flydiff.el +++ b/packages/diff-hl/diff-hl-flydiff.el @@ -39,7 +39,7 @@ :type 'number) (defvar diff-hl-flydiff-modified-tick 0) -(defvar diff-hl-flydiff-timer) +(defvar diff-hl-flydiff-timer nil) (make-variable-buffer-local 'diff-hl-flydiff-modified-tick) (defun diff-hl-flydiff/vc-git--symbolic-ref (file) @@ -167,6 +167,7 @@ This requires the external program `diff' to be in your `exec-path'." (advice-remove 'diff-hl-modified-p #'diff-hl-flydiff/modified-p) (advice-remove 'diff-hl-changes-buffer #'diff-hl-flydiff-buffer-with-head) - (cancel-timer diff-hl-flydiff-timer))) + (and diff-hl-flydiff-timer + (cancel-timer diff-hl-flydiff-timer)))) (provide 'diff-hl-flydiff)