Commit 6e3adf31 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey Committed by Benno Schulenberg
Browse files

tweaks: let update_line() return the correct value on error

If the given line is out of range of editwinrows, we don't display it
at all, so we obviously don't display more than one line of it.  Thus,
the return value in this case should be zero, not one.
No related merge requests found
Showing with 2 additions and 1 deletion
+2 -1
......@@ -2683,8 +2683,9 @@ int update_line(filestruct *fileptr, size_t index)
#endif
row = fileptr->lineno - openfile->edittop->lineno;
/* If the line is offscreen, don't even try to display it. */
if (row < 0 || row >= editwinrows)
return 1;
return 0;
/* First, blank out the row. */
blank_row(edit, row, 0, COLS);
......
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