Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions diff-hl-show-hunk-inline.el
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ Compute it from LINES starting at INDEX with a WINDOW-SIZE."
(index (min index (- len window-size))))
(diff-hl-show-hunk-inline--splice lines index window-size)))

(defun diff-hl-show-hunk-inline--underline-face ()
"Return the face used for inline popup underlines."
`(:underline ,(if (>= emacs-major-version 29) '(:position t) t)))

(defun diff-hl-show-hunk-inline--compute-header (width &optional header)
"Compute the header of the popup.
Compute it from some WIDTH, and some optional HEADER text."
Expand All @@ -115,7 +119,7 @@ Compute it from some WIDTH, and some optional HEADER text."
(new-width (- width (length header) (length scroll-indicator)))
(line (propertize (concat (diff-hl-show-hunk-inline--separator new-width)
header scroll-indicator )
'face '(:underline t))))
'face (diff-hl-show-hunk-inline--underline-face))))
(concat line "\n") ))

(defun diff-hl-show-hunk-inline--compute-footer (width &optional footer)
Expand All @@ -133,7 +137,7 @@ Compute it from some WIDTH, and some optional FOOTER text."
(blank-line (if (display-graphic-p)
""
(concat "\n" (propertize (diff-hl-show-hunk-inline--separator width)
'face '(:underline t)))))
'face (diff-hl-show-hunk-inline--underline-face)))))
(line (propertize (concat (diff-hl-show-hunk-inline--separator new-width)
footer scroll-indicator)
'face '(:overline t))))
Expand Down
Loading