From 2da83c9d3630702ed10f54e890709d1afdb6585f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 9 Oct 2017 15:28:16 +0300 Subject: [PATCH] Avoid assertion violations when line numbers are displayed * src/xdisp.c (redisplay_window): Clear the window's desired glyph matrix before calling try_window with the same starting point. This avoids assertion violations when switching from a buffer without line numbers to a buffer with line numbers. (Bug28710) --- src/xdisp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/xdisp.c b/src/xdisp.c index 141275f15a0..b14b7daf2b0 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -17036,6 +17036,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p) = try_window_reusing_current_matrix (w))) { IF_DEBUG (debug_method_add (w, "1")); + clear_glyph_matrix (w->desired_matrix); if (try_window (window, startp, TRY_WINDOW_CHECK_MARGINS) < 0) /* -1 means we need to scroll. 0 means we need new matrices, but fonts_changed -- 2.39.5