Skip to content

Commit

Permalink
Solve the "cloned indirect buffer" problem
Browse files Browse the repository at this point in the history
  • Loading branch information
dgutov committed Aug 28, 2016
1 parent e933675 commit f8ce39d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions diff-hl.el
Expand Up @@ -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)
Expand Down

0 comments on commit f8ce39d

Please sign in to comment.