GNU bug report logs -
#35659
26.1; Weird horizontal scroll behavior with certain settings for `auto-hscroll-mode' and `hscroll-step`.
Previous Next
Full log
View this message in rfc822 format
tags 35659 notabug
thanks
> From: clemera <clemera <at> posteo.net>
> Date: Thu, 9 May 2019 21:15:26 +0200
>
> After starting emacs -Q I set the following settings by evaluating them in *scratch*:
>
> (setq auto-hscroll-mode 'current-line
> hscroll-step 1
> truncate-lines t)
>
> Now after adding a long line right after the above code block (which exceeds the frame width)
> go to the end of the long line. The line scrolls as expected but when you go from there to the lines above, those get
> pushed to the left. I have recorded a gif which shows the described behavior:
>
> https://imgur.com/a/lJYo4Od
This is the normal behavior of C-n and C-p (UP and DOWN arrow keys):
they try to move into the same column of the next/previous line as the
one of the line you started with. The rationale is to allow you to
see the same horizontal region in the lines through which you
traverse. Neither auto-hscroll-mode nor the current-line hscrolling
feature change that basic behavior.
If we were to disable this feature, typing C-n followed by C-p would
not return you back to the same column; you'd need to manually go to
the original column instead. That'd be an annoyance, I think, as it
would effectively throw away your hscroll each time you move to
another line.
So I don't think there's a bug here.
This bug report was last modified 5 years and 358 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.