0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.1.0567: error for NUL byte in ScreenLines goes unnoticed

Problem:    Error for NUL byte in ScreenLines goes unnoticed.
Solution:   Add an internal error message.
This commit is contained in:
Bram Moolenaar
2018-12-07 13:26:39 +01:00
parent 20091c18c4
commit 4087bfd96d
2 changed files with 11 additions and 3 deletions

View File

@@ -2753,9 +2753,15 @@ gui_redraw_block(
}
else if (enc_utf8)
{
// FIXME: how can the first character ever be zero?
if (col1 > 0 && ScreenLines[off + col1] == 0)
--col1;
if (ScreenLines[off + col1] == 0)
{
if (col1 > 0)
--col1;
else
// FIXME: how can the first character ever be zero?
IEMSGN("INTERNAL ERROR: NUL in ScreenLines in row %ld",
gui.row);
}
# ifdef FEAT_GUI_GTK
if (col2 + 1 < Columns && ScreenLines[off + col2 + 1] == 0)
++col2;