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.master
parent
c0fa3f04b1
commit
98b029cf3e
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue