From: Dmitry Gutov Date: Fri, 13 May 2016 14:12:06 +0000 (+0300) Subject: Fix #68 X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/a55c703c845c0d5956bfff4cd68c4bb91fc91bd2 Fix #68 --- diff --git a/diff-hl-flydiff.el b/diff-hl-flydiff.el index 94dbbd7f6..7f0c6c7de 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)