aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2016-02-12 21:38:44 +0200
committerEli Zaretskii2016-02-12 21:38:44 +0200
commitd82f24ba8530eb8de04a319cc80742a0a953040e (patch)
treebd033d711a0f9465a77acccc0ee707c07f0e5f72 /src
parent85a2753d96c5316f63eca20759fc9a1126545ad7 (diff)
downloademacs-d82f24ba8530eb8de04a319cc80742a0a953040e.tar.gz
emacs-d82f24ba8530eb8de04a319cc80742a0a953040e.zip
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)
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 8f1e98d99ef..840699d00fb 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -825,6 +825,7 @@ static Lisp_Object redisplay_window_1 (Lisp_Object);
825static bool set_cursor_from_row (struct window *, struct glyph_row *, 825static bool set_cursor_from_row (struct window *, struct glyph_row *,
826 struct glyph_matrix *, ptrdiff_t, ptrdiff_t, 826 struct glyph_matrix *, ptrdiff_t, ptrdiff_t,
827 int, int); 827 int, int);
828static bool cursor_row_fully_visible_p (struct window *, bool, bool);
828static bool update_menu_bar (struct frame *, bool, bool); 829static bool update_menu_bar (struct frame *, bool, bool);
829static bool try_window_reusing_current_matrix (struct window *); 830static bool try_window_reusing_current_matrix (struct window *);
830static int try_window_id (struct window *); 831static int try_window_id (struct window *);
@@ -13881,11 +13882,16 @@ redisplay_internal (void)
13881 eassert (this_line_vpos == it.vpos); 13882 eassert (this_line_vpos == it.vpos);
13882 eassert (this_line_y == it.current_y); 13883 eassert (this_line_y == it.current_y);
13883 set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0); 13884 set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0);
13885 if (cursor_row_fully_visible_p (w, false, true))
13886 {
13884#ifdef GLYPH_DEBUG 13887#ifdef GLYPH_DEBUG
13885 *w->desired_matrix->method = 0; 13888 *w->desired_matrix->method = 0;
13886 debug_method_add (w, "optimization 3"); 13889 debug_method_add (w, "optimization 3");
13887#endif 13890#endif
13888 goto update; 13891 goto update;
13892 }
13893 else
13894 goto cancel;
13889 } 13895 }
13890 else 13896 else
13891 goto cancel; 13897 goto cancel;