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

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

[elpa] master 7144c1c 1/8: diff-hl-flydiff: Set tick to nil and use buff


From: Dmitry Gutov
Subject: [elpa] master 7144c1c 1/8: diff-hl-flydiff: Set tick to nil and use buffer-chars-modified-tick
Date: Sat, 23 Feb 2019 18:35:44 -0500 (EST)

branch: master
commit 7144c1c3c346017a90642340747598e0e883aded
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    diff-hl-flydiff: Set tick to nil and use buffer-chars-modified-tick
    
    #114
---
 diff-hl-flydiff.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/diff-hl-flydiff.el b/diff-hl-flydiff.el
index 33cbfbd..6c7dd4b 100644
--- a/diff-hl-flydiff.el
+++ b/diff-hl-flydiff.el
@@ -38,7 +38,7 @@
   "The idle delay in seconds before highlighting is updated."
   :type 'number)
 
-(defvar diff-hl-flydiff-modified-tick 0)
+(defvar diff-hl-flydiff-modified-tick nil)
 (defvar diff-hl-flydiff-timer nil)
 (make-variable-buffer-local 'diff-hl-flydiff-modified-tick)
 
@@ -124,7 +124,7 @@ the user should be returned."
 This requires the external program `diff' to be in your `exec-path'."
   (interactive)
   (vc-ensure-vc-buffer)
-  (setq diff-hl-flydiff-modified-tick (buffer-modified-tick))
+  (setq diff-hl-flydiff-modified-tick (buffer-chars-modified-tick))
   (save-current-buffer
     (let* ((temporary-file-directory
             (if (file-directory-p "/dev/shm/")
@@ -140,7 +140,7 @@ This requires the external program `diff' to be in your 
`exec-path'."
 (defun diff-hl-flydiff-update ()
   (unless (or
            (not diff-hl-mode)
-           (= diff-hl-flydiff-modified-tick (buffer-modified-tick))
+           (= diff-hl-flydiff-modified-tick (buffer-chars-modified-tick))
            (not buffer-file-name)
            (not (file-exists-p buffer-file-name))
            (file-remote-p default-directory))



reply via email to

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