From 5db0bdc7dcd9300b983526d37cbe480f35e36211 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Sat, 27 Jul 2024 11:55:06 -0700 Subject: [PATCH] Fix pixel-scroll-precision-mode when point is on a blank line When in the point is on a blank line in normal state, scrolling down with `pixel-scroll-precision-mode` enabled "sticks" because Evil ends up invoking `line-move` in the `post-command-hook`. `line-move` resets vscroll to 0, which undoes the scroll if we scrolled less than a line. Specifically, `evil-normal-post-command` calls `evil-adjust-cursor` which calls `evil-move-end-of-line` which calls `move-end-of-line`, which finally calls `line-move`. This change avoids this issue by removing the call to `evil-move-end-of-line` entirely, instead relying on the `bolp` call in `evil-move-cursor-back`. --- evil-common.el | 1 - 1 file changed, 1 deletion(-) diff --git a/evil-common.el b/evil-common.el index 7f60bdfb..cd620d48 100644 --- a/evil-common.el +++ b/evil-common.el @@ -970,7 +970,6 @@ Like `move-end-of-line', but retains the goal column." This behavior is controlled by `evil-move-beyond-eol'." (and (not evil-move-beyond-eol) (eolp) - (= (point) (save-excursion (evil-move-end-of-line) (point))) (evil-move-cursor-back t))) (defun evil-move-cursor-back (&optional force)