I am using (setq scroll-preserve-screen-position t)
as suggested at https://superuser.com/a/184421/39697, and it works well, except for me, when I scroll at the top of the screen using scroll-up-line
, the cursor moves foward one character (same with the bottom of the screen).
This isn't happening with emacs -Q
, so I'm unsure what in my configuration is causing it. I'd like to use bug-hunter to find why, but I'm unsure how to encode this as a test expression.
elisp
. There are some additional settings that could make it more noticeable, and you might have added one of those -- e.g.,scroll-margin
. I don't know if this is related to your issue.comment-region
to comment out 1/2, then 3/4, 7/8,... of the file. Once you've located the problem, if you still need help then report about it here, in more detail.M-x scroll-up-line
, will it always move point forward by one character?M-x scroll-down-line
then the cursor moves forward. For instance if the cursor is in column 3 after runningscroll-down-line
it will be in column 4 (and on the previous line obviously). Ditto forscroll-up-line
if it is at the top of the windows: it moves one column forward each time. It also happens when usingC-v
andM-v
. I haven't been able to play with it too much yet, but it does seem to do it every time so far.scroll-up-line
when it's at the bottom of visa versa) the behavior is as expected: the cursor stays on the column it was on. This is also true ofC-v
andM-v
: they only move the cursor column when it is at the very top or bottom of the window.