commit e46c6c96077f918a2c6cdb1d12b8360bc0a8a1c2
parent 8b7bbebeeb5b021434c19d24f82e1cc798ebe53f
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 22 Mar 2017 11:00:51 +0100
tweaks: ehm... the warning is more important for the softwrap case
But apparently none of these cases occur, because I can't trigger them.
Diffstat:
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/winio.c b/src/winio.c
@@ -2668,7 +2668,7 @@ int update_line(filestruct *fileptr, size_t index)
/* If the line is offscreen, don't even try to display it. */
if (row < 0 || row >= editwinrows) {
- statusline(ALERT, "Badness: tried to display a chunk on row %i"
+ statusline(ALERT, "Badness: tried to display a line on row %i"
" -- please report a bug", row);
return 0;
}
@@ -2725,9 +2725,12 @@ int update_softwrapped_line(filestruct *fileptr)
line = line->next;
}
- /* If the line is offscreen, don't even try to display it. */
- if (row < 0 || row >= editwinrows)
+ /* If the first chunk is offscreen, don't even try to display it. */
+ if (row < 0 || row >= editwinrows) {
+ statusline(ALERT, "Badness: tried to display a chunk on row %i"
+ " -- please report a bug", row);
return 0;
+ }
full_length = strlenpt(fileptr->data);
starting_row = row;