aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2026-02-01 17:26:56 +0200
committerEli Zaretskii2026-02-01 17:26:56 +0200
commit2652e11930125b5b5e28f3f01e73b07eacb5ef75 (patch)
tree56fb27bfd390f76b26c5ab9d1a222ec339477240 /src
parentac07913bd81db8ffdab2754cc6f75158460ee02b (diff)
downloademacs-2652e11930125b5b5e28f3f01e73b07eacb5ef75.tar.gz
emacs-2652e11930125b5b5e28f3f01e73b07eacb5ef75.zip
Minor improvements in vertical cusror motion
* src/xdisp.c (move_it_vertically_backward): Zero out cached value of line height, to avoid using stale and incorrect values. (try_window_reusing_current_matrix): Fix conditions for changes in tab-line height. Reported by Michael Heerdegen <michael_heerdegen@mailbox.org> in https://lists.gnu.org/archive/html/help-gnu-emacs/2026-01/msg00163.html This improves the scrolling a little bit, but doesn't solve the problem entirely.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index fa826c366dd..22e178fcdc9 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -11300,6 +11300,7 @@ move_it_vertically_backward (struct it *it, int dy)
11300 int line_height; 11300 int line_height;
11301 11301
11302 RESTORE_IT (&it3, &it3, it3data); 11302 RESTORE_IT (&it3, &it3, it3data);
11303 last_height = 0;
11303 y1 = line_bottom_y (&it3); 11304 y1 = line_bottom_y (&it3);
11304 line_height = y1 - y0; 11305 line_height = y1 - y0;
11305 RESTORE_IT (it, it, it2data); 11306 RESTORE_IT (it, it, it2data);
@@ -21673,8 +21674,9 @@ try_window_reusing_current_matrix (struct window *w)
21673 return false; 21674 return false;
21674 21675
21675 /* If top-line visibility has changed, give up. */ 21676 /* If top-line visibility has changed, give up. */
21676 if (window_wants_tab_line (w) 21677 if (!w->current_matrix->header_line_p
21677 != MATRIX_TAB_LINE_ROW (w->current_matrix)->mode_line_p) 21678 && (window_wants_tab_line (w)
21679 != MATRIX_TAB_LINE_ROW (w->current_matrix)->mode_line_p))
21678 return false; 21680 return false;
21679 21681
21680 /* If top-line visibility has changed, give up. */ 21682 /* If top-line visibility has changed, give up. */