Commit 98b029cf authored by David Lawrence Ramsey's avatar David Lawrence Ramsey Committed by Benno Schulenberg
Browse files

softwrap: account for firstcolumn in reset_cursor()

When counting rows in softwrap mode, reset_cursor() should compensate for
the number of softwrapped chunks that edittop takes up before firstcolumn.
parent c0fa3f04
Showing with 2 additions and 0 deletions
+2 -0
......@@ -2268,6 +2268,8 @@ void reset_cursor(void)
if (ISSET(SOFTWRAP)) {
filestruct *line = openfile->edittop;
row -= (openfile->firstcolumn / editwincols);
/* Calculate how many rows the lines from edittop to current use. */
while (line != NULL && line != openfile->current) {
row += strlenpt(line->data) / editwincols + 1;
......
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