tweaks: ehm... the warning is more important for the softwrap case

But apparently none of these cases occur, because I can't trigger them.
master
Benno Schulenberg 2017-03-22 11:00:51 +01:00
parent 8b7bbebeeb
commit e46c6c9607
1 changed files with 6 additions and 3 deletions

View File

@ -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;