Mercurial > vim
comparison src/gui.c @ 15113:ae25a1172514 v8.1.0567
patch 8.1.0567: error for NUL byte in ScreenLines goes unnoticed
commit https://github.com/vim/vim/commit/4087bfd96d0d70791a1572ac4b40d5a655e2166b
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Dec 7 13:26:39 2018 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 07 Dec 2018 13:30:08 +0100 |
parents | b91cd042c2fc |
children | f17110dae9de |
comparison
equal
deleted
inserted
replaced
15112:71b114f291a8 | 15113:ae25a1172514 |
---|---|
2751 col2 += dbcs_screen_tail_off(ScreenLines + off, | 2751 col2 += dbcs_screen_tail_off(ScreenLines + off, |
2752 ScreenLines + off + col2); | 2752 ScreenLines + off + col2); |
2753 } | 2753 } |
2754 else if (enc_utf8) | 2754 else if (enc_utf8) |
2755 { | 2755 { |
2756 // FIXME: how can the first character ever be zero? | 2756 if (ScreenLines[off + col1] == 0) |
2757 if (col1 > 0 && ScreenLines[off + col1] == 0) | 2757 { |
2758 --col1; | 2758 if (col1 > 0) |
2759 --col1; | |
2760 else | |
2761 // FIXME: how can the first character ever be zero? | |
2762 IEMSGN("INTERNAL ERROR: NUL in ScreenLines in row %ld", | |
2763 gui.row); | |
2764 } | |
2759 # ifdef FEAT_GUI_GTK | 2765 # ifdef FEAT_GUI_GTK |
2760 if (col2 + 1 < Columns && ScreenLines[off + col2 + 1] == 0) | 2766 if (col2 + 1 < Columns && ScreenLines[off + col2 + 1] == 0) |
2761 ++col2; | 2767 ++col2; |
2762 # endif | 2768 # endif |
2763 } | 2769 } |