Commit e46c6c96 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

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

But apparently none of these cases occur, because I can't trigger them.
parent 8b7bbebe
Showing with 6 additions and 3 deletions
+6 -3
...@@ -2668,7 +2668,7 @@ int update_line(filestruct *fileptr, size_t index) ...@@ -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 the line is offscreen, don't even try to display it. */
if (row < 0 || row >= editwinrows) { 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); " -- please report a bug", row);
return 0; return 0;
} }
...@@ -2725,9 +2725,12 @@ int update_softwrapped_line(filestruct *fileptr) ...@@ -2725,9 +2725,12 @@ int update_softwrapped_line(filestruct *fileptr)
line = line->next; line = line->next;
} }
/* If the line is offscreen, don't even try to display it. */ /* If the first chunk is offscreen, don't even try to display it. */
if (row < 0 || row >= editwinrows) if (row < 0 || row >= editwinrows) {
statusline(ALERT, "Badness: tried to display a chunk on row %i"
" -- please report a bug", row);
return 0; return 0;
}
full_length = strlenpt(fileptr->data); full_length = strlenpt(fileptr->data);
starting_row = row; starting_row = row;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment