[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 6fa3176: Prevent display corruption when display-li
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 6fa3176: Prevent display corruption when display-line-numbers is set |
Date: |
Fri, 14 Jul 2017 03:54:59 -0400 (EDT) |
branch: master
commit 6fa3176ccae2bd8dcf082b80063c4e2148f5e8fd
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Prevent display corruption when display-line-numbers is set
* src/xdisp.c (try_window_reusing_current_matrix): If giving up
due to display-line-numbers, clear the window's desired glyph
matrix before returning, as the following call to try_window will
call display_line, which expects rows of the desired matrix
cleared. (Bug#27668)
---
src/xdisp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/xdisp.c b/src/xdisp.c
index 6b0532d..85b9eae 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -17655,6 +17655,9 @@ try_window_reusing_current_matrix (struct window *w)
if (w->vscroll || MATRIX_ROW_PARTIALLY_VISIBLE_P (w, start_row))
return false;
+ /* Clear the desired matrix for the display below. */
+ clear_glyph_matrix (w->desired_matrix);
+
/* Give up if line numbers are being displayed, because reusing the
current matrix might use the wrong width for line-number
display. */
@@ -17667,9 +17670,6 @@ try_window_reusing_current_matrix (struct window *w)
start = start_row->minpos;
start_vpos = MATRIX_ROW_VPOS (start_row, w->current_matrix);
- /* Clear the desired matrix for the display below. */
- clear_glyph_matrix (w->desired_matrix);
-
if (CHARPOS (new_start) <= CHARPOS (start))
{
/* Don't use this method if the display starts with an ellipsis
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 6fa3176: Prevent display corruption when display-line-numbers is set,
Eli Zaretskii <=