[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master ed4ba79ea8: Avoid infloop in redisplay when displaying a tooltip
From: |
Eli Zaretskii |
Subject: |
master ed4ba79ea8: Avoid infloop in redisplay when displaying a tooltip |
Date: |
Fri, 15 Jul 2022 06:51:11 -0400 (EDT) |
branch: master
commit ed4ba79ea8f2be2d01f6447910e2c8319908d0d6
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Avoid infloop in redisplay when displaying a tooltip
* src/xdisp.c (try_window): Ensure we fail if 'display_line'
indicates that the dimensions of the glyph matrix are
insufficient. (Bug#56561)
---
src/xdisp.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/xdisp.c b/src/xdisp.c
index f205327cc3..1940d16a01 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -20200,9 +20200,16 @@ try_window (Lisp_Object window, struct text_pos pos,
int flags)
/* Display all lines of W. */
while (it.current_y < it.last_visible_y)
{
+ int last_row_scale = it.w->nrows_scale_factor;
+ int last_col_scale = it.w->ncols_scale_factor;
if (display_line (&it, cursor_vpos))
last_text_row = it.glyph_row - 1;
- if (f->fonts_changed && !(flags & TRY_WINDOW_IGNORE_FONTS_CHANGE))
+ if (f->fonts_changed
+ && !((flags & TRY_WINDOW_IGNORE_FONTS_CHANGE)
+ /* If the matrix dimensions are insufficient, we _must_
+ fail and let dispnew.c reallocate the matrix. */
+ && last_row_scale == it.w->nrows_scale_factor
+ && last_col_scale == it.w->ncols_scale_factor))
return 0;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master ed4ba79ea8: Avoid infloop in redisplay when displaying a tooltip,
Eli Zaretskii <=