mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Fix hl-line mode bleeding into window in Emacs 26
This commit is contained in:
@ -273,6 +273,16 @@ local value, whether or not it's permanent-local. Therefore, we cycle
|
||||
(setq hl-line-sticky-flag nil
|
||||
global-hl-line-sticky-flag nil)
|
||||
|
||||
;; On Emacs 26+, when point is on the last line, hl-line highlights bleed into
|
||||
;; the rest of the window after eob. This is the fix.
|
||||
(when (boundp 'display-line-numbers)
|
||||
(defun doom--line-range ()
|
||||
(cons (line-beginning-position)
|
||||
(if (save-excursion (forward-line) (eobp))
|
||||
(line-end-position)
|
||||
(line-beginning-position 2))))
|
||||
(setq hl-line-range-function #'doom--line-range))
|
||||
|
||||
(after! evil
|
||||
(defvar-local doom-buffer-hl-line-mode nil)
|
||||
|
||||
|
Reference in New Issue
Block a user