[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 67e7870a62: Fix mouse clicks in hscrolled window with variable-he
From: |
Eli Zaretskii |
Subject: |
master 67e7870a62: Fix mouse clicks in hscrolled window with variable-height fonts |
Date: |
Thu, 14 Apr 2022 13:42:48 -0400 (EDT) |
branch: master
commit 67e7870a621aacd8fd5d096fe673d86cc1f3a0f5
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Fix mouse clicks in hscrolled window with variable-height fonts
* src/xdisp.c (move_it_in_display_line_to): Fix calculation of
height of a screen-line that is completely hscrolled out of view.
Reported by Yasushi SHOJI <yasushi.shoji@gmail.com>.
---
src/xdisp.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/xdisp.c b/src/xdisp.c
index 6a0d0ea879..2dbc68f657 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -9910,6 +9910,18 @@ move_it_in_display_line_to (struct it *it,
}
else
result = MOVE_NEWLINE_OR_CR;
+ /* If lines are truncated, and the line we moved across is
+ completely hscrolled out of view, reset the line metrics
+ to those of the newline we've just processed, so that
+ glyphs not on display don't affect the line's height. */
+ if (it->line_wrap == TRUNCATE
+ && it->current_x <= it->first_visible_x
+ && result == MOVE_NEWLINE_OR_CR
+ && it->char_to_display == '\n')
+ {
+ it->max_ascent = it->ascent;
+ it->max_descent = it->descent;
+ }
/* If we've processed the newline, make sure this flag is
reset, as it must only be set when the newline itself is
processed. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 67e7870a62: Fix mouse clicks in hscrolled window with variable-height fonts,
Eli Zaretskii <=