nano

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

commit 5fcda555ea45a0e7684a75b8d8fffc3460783adb
parent 873f99d96a6eb13adbed5289fd45e155f4a880ae
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Fri, 18 Aug 2017 16:43:09 -0500

display: constrain line numbers on softwrapped lines with sprawling tabs

Check the column number, not the character index, when suppressing the
line number on chunks other than the first, since the index can be zero
when in fact we're on a later chunk.

This fixes https://savannah.gnu.org/bugs/index.php?51790.

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

diff --git a/src/winio.c b/src/winio.c @@ -2352,7 +2352,7 @@ void edit_draw(filestruct *fileptr, const char *converted, if (margin > 0) { wattron(edit, interface_color_pair[LINE_NUMBER]); #ifndef NANO_TINY - if (ISSET(SOFTWRAP) && from_x != 0) + if (ISSET(SOFTWRAP) && from_col != 0) mvwprintw(edit, row, 0, "%*s", margin - 1, " "); else #endif