Commit 8091d0a5 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

tweaks: simplify and correct a computation

The leftedge variable is a column number, not an x position.
No related merge requests found
Showing with 1 addition and 1 deletion
+1 -1
......@@ -2923,7 +2923,7 @@ void edit_scroll(scroll_dir direction, int nrows)
/* If the first blank row is in the middle of a softwrapped line,
* compensate for the earlier onscreen chunks of that line. */
if (ISSET(SOFTWRAP) && i == nrows && line != openfile->edittop)
i += strnlenpt(line->data, leftedge) / editwincols;
i += leftedge / editwincols;
#endif
i -= update_line(line, (line == openfile->current) ?
openfile->current_x : 0);
......
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