mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 14:30:50 -08:00
Fix redisplay after a large insertion
* src/xdisp.c (redisplay_internal): Don't accept the results of "optimization 3" if the cursor ends up in a partially visible glyph row. (Bug22637)
This commit is contained in:
parent
85a2753d96
commit
d82f24ba85
1 changed files with 9 additions and 3 deletions
12
src/xdisp.c
12
src/xdisp.c
|
|
@ -825,6 +825,7 @@ static Lisp_Object redisplay_window_1 (Lisp_Object);
|
||||||
static bool set_cursor_from_row (struct window *, struct glyph_row *,
|
static bool set_cursor_from_row (struct window *, struct glyph_row *,
|
||||||
struct glyph_matrix *, ptrdiff_t, ptrdiff_t,
|
struct glyph_matrix *, ptrdiff_t, ptrdiff_t,
|
||||||
int, int);
|
int, int);
|
||||||
|
static bool cursor_row_fully_visible_p (struct window *, bool, bool);
|
||||||
static bool update_menu_bar (struct frame *, bool, bool);
|
static bool update_menu_bar (struct frame *, bool, bool);
|
||||||
static bool try_window_reusing_current_matrix (struct window *);
|
static bool try_window_reusing_current_matrix (struct window *);
|
||||||
static int try_window_id (struct window *);
|
static int try_window_id (struct window *);
|
||||||
|
|
@ -13881,11 +13882,16 @@ redisplay_internal (void)
|
||||||
eassert (this_line_vpos == it.vpos);
|
eassert (this_line_vpos == it.vpos);
|
||||||
eassert (this_line_y == it.current_y);
|
eassert (this_line_y == it.current_y);
|
||||||
set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0);
|
set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0);
|
||||||
|
if (cursor_row_fully_visible_p (w, false, true))
|
||||||
|
{
|
||||||
#ifdef GLYPH_DEBUG
|
#ifdef GLYPH_DEBUG
|
||||||
*w->desired_matrix->method = 0;
|
*w->desired_matrix->method = 0;
|
||||||
debug_method_add (w, "optimization 3");
|
debug_method_add (w, "optimization 3");
|
||||||
#endif
|
#endif
|
||||||
goto update;
|
goto update;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
goto cancel;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
goto cancel;
|
goto cancel;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue