Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an issue where moving the cursor to end of the buffer would result in no visible text #1938

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .dir-locals.el

This file was deleted.

13 changes: 12 additions & 1 deletion evil-commands.el
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,18 @@ 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)))
;; When the user sets `scroll-conservatively` to a value greater
;; than 100, moving the cursor to `(point-max)` with
;; `(evil-goto-line nil)` can result in all text being located above
;; the window start, preventing the user from seeing it.
;;
;; The following addresses this issue:
(overlay-recenter (point))
(recenter -1)))
(goto-char (point-min))
(forward-line (1- count)))))

Expand Down