[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 8ec475e558: Improve preserving X coordinate during scroll command
From: |
Eli Zaretskii |
Subject: |
master 8ec475e558: Improve preserving X coordinate during scroll commands |
Date: |
Thu, 13 Jan 2022 07:22:00 -0500 (EST) |
branch: master
commit 8ec475e558dcd0ebde213d8a73f09574e8b4d00a
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Improve preserving X coordinate during scroll commands
* src/window.c (window_scroll_pixel_based): Don't unnecessarily
move the iterator. (Bug#53220)
---
src/window.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/window.c b/src/window.c
index 7155f0e6bc..2a5e4042a4 100644
--- a/src/window.c
+++ b/src/window.c
@@ -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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 8ec475e558: Improve preserving X coordinate during scroll commands,
Eli Zaretskii <=