]> git.eshelyaron.com Git - emacs.git/commitdiff
Add assertion related to display-line-numbers
authorEli Zaretskii <eliz@gnu.org>
Fri, 14 Jul 2017 08:00:25 +0000 (11:00 +0300)
committerEli Zaretskii <eliz@gnu.org>
Fri, 14 Jul 2017 08:00:25 +0000 (11:00 +0300)
* 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

index 85b9eae36d11e7289a4e149107f2d84c88aa16ea..2aceb89c0036203fb670d164a516e68a4ae28683 100644 (file)
@@ -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;