Skip to content

Commit

Permalink
feat: Extend face
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Feb 6, 2024
1 parent 21e24d4 commit 4e712da
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions goto-line-preview.el
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
:type 'integer)

(defface goto-line-preview-hl
'((t :inherit highlight))
'((t :inherit highlight :extend t))
"Face to use for highlighting when change preview line."
:group 'goto-line-preview)

Expand All @@ -70,8 +70,9 @@
(defun goto-line-preview--highlight ()
"Keep highlight for a fixed time."
(when goto-line-preview-hl-duration
(let ((overlay (make-overlay (line-beginning-position) (line-end-position))))
(let ((overlay (make-overlay (line-beginning-position) (1+ (line-end-position)))))
(overlay-put overlay 'face 'goto-line-preview-hl)
(overlay-put overlay 'window (selected-window))
(sit-for goto-line-preview-hl-duration)
(delete-overlay overlay))))

Expand Down

0 comments on commit 4e712da

Please sign in to comment.