Skip to content

Commit 4feba3e

Browse files
committed
Fix "whole buffer" highlights for 'added' and 'removed' files
1 parent 5446a69 commit 4feba3e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

diff-hl.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -469,9 +469,9 @@ It can be a relative expression as well, such as \"HEAD^\" with Git, or
469469
`((:reference . ,(diff-hl-adjust-changes ref-changes work-changes))
470470
(:working . ,work-changes))))
471471
((eq state 'added)
472-
`((1 ,(line-number-at-pos (point-max)) insert)))
472+
`((:working . ((1 ,(line-number-at-pos (point-max)) 0 insert)))))
473473
((eq state 'removed)
474-
`((1 ,(line-number-at-pos (point-max)) delete))))))))
474+
`((:working . ((1 0 ,(line-number-at-pos (point-max)) delete))))))))))
475475

476476
(defvar diff-hl-head-revision-alist '((Git . "HEAD") (Bzr . "last:1") (Hg . ".")))
477477

@@ -664,7 +664,7 @@ Return a list of line overlays used."
664664
(defun diff-hl--update ()
665665
(let* ((cc (diff-hl-changes))
666666
(ref-changes (assoc-default :reference cc))
667-
(changes (assoc-default :working cc nil cc))
667+
(changes (assoc-default :working cc))
668668
reuse)
669669
(diff-hl-remove-overlays)
670670
(let ((diff-hl-highlight-function

0 commit comments

Comments
 (0)