nano

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

commit 93c6248956a42d163100348d08df1782e415bd7a
parent 66ef8f45a3ba810a5db62c6f11008bd90fa9396e
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Tue, 28 Mar 2017 08:45:59 -0500

display: don't compensate for chunks before firstcolumn

The number of rows to draw shouldn't be compensated for the chunks
of edittop that are before firstcolumn, because they are offscreen.

This completes the fix for https://savannah.gnu.org/bugs/?50621.

Diffstat:
Msrc/winio.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/winio.c b/src/winio.c @@ -2921,8 +2921,8 @@ void edit_scroll(scroll_dir direction, int nrows) while (i > 0 && line != NULL) { #ifndef NANO_TINY /* If the first blank row is in the middle of a softwrapped line, - * compensate for the earlier chunks of that line. */ - if (ISSET(SOFTWRAP) && i == nrows) + * compensate for the earlier onscreen chunks of that line. */ + if (ISSET(SOFTWRAP) && i == nrows && line != openfile->edittop) i += strnlenpt(line->data, leftedge) / editwincols; #endif i -= update_line(line, (line == openfile->current) ?