diff options
| author | Eli Zaretskii | 2016-02-12 21:38:44 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2016-02-12 21:38:44 +0200 |
| commit | d82f24ba8530eb8de04a319cc80742a0a953040e (patch) | |
| tree | bd033d711a0f9465a77acccc0ee707c07f0e5f72 /src | |
| parent | 85a2753d96c5316f63eca20759fc9a1126545ad7 (diff) | |
| download | emacs-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.c | 12 |
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); | |||
| 825 | static bool set_cursor_from_row (struct window *, struct glyph_row *, | 825 | static 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); |
| 828 | static bool cursor_row_fully_visible_p (struct window *, bool, bool); | ||
| 828 | static bool update_menu_bar (struct frame *, bool, bool); | 829 | static bool update_menu_bar (struct frame *, bool, bool); |
| 829 | static bool try_window_reusing_current_matrix (struct window *); | 830 | static bool try_window_reusing_current_matrix (struct window *); |
| 830 | static int try_window_id (struct window *); | 831 | static 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; |