Skip to content

Commit

Permalink
Fix issue: No visible text when cursor is moved to the end of buffer
Browse files Browse the repository at this point in the history
This fixes an issue where using `evil-goto-line` to move the cursor to
the end of the document would result in no visible text because
`window-start` is equal to `point-max`.
  • Loading branch information
jamescherti committed Nov 7, 2024
1 parent 81ec688 commit 857b357
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion evil-commands.el
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,12 @@ of the current screen line."
:type line
(evil-ensure-column
(if (null count)
(goto-char (point-max))
(progn
(goto-char (point-max))
(when (and (eq (current-buffer) (window-buffer))
(> (point) (window-end nil t)))
(overlay-recenter (point))
(recenter -1)))
(goto-char (point-min))
(forward-line (1- count)))))

Expand Down

0 comments on commit 857b357

Please sign in to comment.