mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-25 07:28:20 +00:00
Improve preserving X coordinate during scroll commands
* src/window.c (window_scroll_pixel_based): Don't unnecessarily move the iterator. (Bug#53220)
This commit is contained in:
parent
50654cf0b1
commit
8ec475e558
@ -5861,7 +5861,8 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror)
|
||||
|
||||
/* We moved the window start towards ZV, so PT may be now
|
||||
in the scroll margin at the top. */
|
||||
move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS);
|
||||
if (IT_CHARPOS (it) < PT)
|
||||
move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS);
|
||||
if (IT_CHARPOS (it) == PT
|
||||
&& it.current_y >= this_scroll_margin
|
||||
&& it.current_y <= last_y - WINDOW_TAB_LINE_HEIGHT (w)
|
||||
|
Loading…
Reference in New Issue
Block a user