Address (literal) edge cases with hl-line eob fix
This commit is contained in:
parent
e109d72121
commit
4560fe7163
1 changed files with 8 additions and 3 deletions
|
@ -278,9 +278,14 @@ local value, whether or not it's permanent-local. Therefore, we cycle
|
||||||
(when (boundp 'display-line-numbers)
|
(when (boundp 'display-line-numbers)
|
||||||
(defun doom--line-range ()
|
(defun doom--line-range ()
|
||||||
(cons (line-beginning-position)
|
(cons (line-beginning-position)
|
||||||
(if (save-excursion (forward-line) (eobp))
|
(cond ((save-excursion
|
||||||
(line-end-position)
|
(goto-char (line-end-position))
|
||||||
(line-beginning-position 2))))
|
(and (eobp) (not (bolp))))
|
||||||
|
(1- (line-end-position)))
|
||||||
|
((or (eobp) (save-excursion (forward-line) (eobp)))
|
||||||
|
(line-end-position))
|
||||||
|
(t
|
||||||
|
(line-beginning-position 2)))))
|
||||||
(setq hl-line-range-function #'doom--line-range))
|
(setq hl-line-range-function #'doom--line-range))
|
||||||
|
|
||||||
(after! evil
|
(after! evil
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue