tweaks: add a warning for a condition that should never occur
parent
55159b7b39
commit
8b7bbebeeb
|
@ -2667,8 +2667,11 @@ int update_line(filestruct *fileptr, size_t index)
|
||||||
row = fileptr->lineno - openfile->edittop->lineno;
|
row = fileptr->lineno - openfile->edittop->lineno;
|
||||||
|
|
||||||
/* 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"
|
||||||
|
" -- please report a bug", row);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* First, blank out the row. */
|
/* First, blank out the row. */
|
||||||
blank_row(edit, row, 0, COLS);
|
blank_row(edit, row, 0, COLS);
|
||||||
|
|
Loading…
Reference in New Issue