From 5fcda555ea45a0e7684a75b8d8fffc3460783adb Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Fri, 18 Aug 2017 16:43:09 -0500 Subject: [PATCH] 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. --- src/winio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/winio.c b/src/winio.c index 6aa9ccf5..dea89300 100644 --- 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