From 037d8bdfeb905f0f1f49c5c7ab2deba13c9c6617 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 14 Jul 2017 11:00:25 +0300 Subject: [PATCH] Add assertion related to display-line-numbers * src/xdisp.c (maybe_produce_line_number): Add assertion for the condition regarding IT->glyph_row->used[TEXT_AREA] expected by the code. (Bug#27668) --- src/xdisp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xdisp.c b/src/xdisp.c index 85b9eae36d1..2aceb89c003 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -21009,6 +21009,8 @@ maybe_produce_line_number (struct it *it) struct glyph *p = it->glyph_row ? it->glyph_row->glyphs[TEXT_AREA] : NULL; short *u = it->glyph_row ? &it->glyph_row->used[TEXT_AREA] : NULL; + eassert (it->glyph_row == NULL || it->glyph_row->used[TEXT_AREA] == 0); + for ( ; g < e; g++) { it->current_x += g->pixel_width; -- 2.39.2