Skip to content

Commit

Permalink
Use text properties instead of overlay to hide +/- markers
Browse files Browse the repository at this point in the history
Not sure why/how but the overlay was interfering with magit's foldable
hunk header, in the case where there was a + marker at the start of
the first line in the hunk.
  • Loading branch information
dandavison committed Apr 29, 2020
1 parent a356ede commit 3fea654
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions magit-delta.el
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ The input buffer contents are expected to be raw git output."
((string-equal (match-string 0) "@@")
(setq in-hunk t))
(in-hunk
(overlay-put (make-overlay (match-beginning 0) (match-end 0))
'display " ")))))))
(add-text-properties (match-beginning 0) (match-end 0)
'(display " "))))))))

(provide 'magit-delta)

Expand Down

0 comments on commit 3fea654

Please sign in to comment.