branch: master
commit a55c703c845c0d5956bfff4cd68c4bb91fc91bd2
Author: Dmitry Gutov <[email protected]>
Commit: Dmitry Gutov <[email protected]>
Fix #68
---
diff-hl-flydiff.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/diff-hl-flydiff.el b/diff-hl-flydiff.el
index 94dbbd7..7f0c6c7 100644
--- a/diff-hl-flydiff.el
+++ b/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)