mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 21:01:24 +03:00
tweaks: simplify and correct a computation
The leftedge variable is a column number, not an x position.
This commit is contained in:
parent
93c6248956
commit
8091d0a574
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user