nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 8091d0a5743ba8440ce90972901ac8bfbe1a39e6
parent 93c6248956a42d163100348d08df1782e415bd7a
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Tue, 28 Mar 2017 19:24:37 +0200

tweaks: simplify and correct a computation

The leftedge variable is a column number, not an x position.

Diffstat:
Msrc/winio.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/winio.c b/src/winio.c @@ -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);