diff --git a/diff-hl-show-hunk-inline.el b/diff-hl-show-hunk-inline.el index 3b5214bb..174a2820 100644 --- a/diff-hl-show-hunk-inline.el +++ b/diff-hl-show-hunk-inline.el @@ -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." @@ -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) @@ -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))))