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

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

[elpa] master f8ce39d 01/25: Solve the "cloned indirect buffer" problem


From: Dmitry Gutov
Subject: [elpa] master f8ce39d 01/25: Solve the "cloned indirect buffer" problem
Date: Sat, 8 Dec 2018 19:19:35 -0500 (EST)

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

    Solve the "cloned indirect buffer" problem
    
    
https://github.com/dgutov/diff-hl/commit/fdbf34a93d6b249ba20d9e7501dfa026aa88ac04#commitcomment-18802844
---
 diff-hl.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/diff-hl.el b/diff-hl.el
index 6650818..d60fce6 100644
--- a/diff-hl.el
+++ b/diff-hl.el
@@ -538,6 +538,10 @@ in the source file, or the last line of the hunk above it."
     (dolist (buf (buffer-list))
       (when (and (buffer-local-value 'diff-hl-mode buf)
                  (not (buffer-modified-p buf))
+                 ;; Solve the "cloned indirect buffer" problem
+                 ;; (diff-hl-mode could be non-nil there, even if
+                 ;; buffer-file-name is nil):
+                 (buffer-file-name buf)
                  (file-in-directory-p (buffer-file-name buf) topdir))
         (with-current-buffer buf
           (let* ((file buffer-file-name)



reply via email to

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