From 9631e858f2b9a7757e3d5ff020f13482572eeaee Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 15 Dec 2019 14:23:32 +0100 Subject: [PATCH] display: don't color the space that separates line numbers from text Go back to how line numbers were colored in versions 2.7.1 to 4.3 -- coloring the space (when a background color is used) was unintented. This fixes https://savannah.gnu.org/bugs/?57412. Bug existed since version 4.4, commit 699cacf7. --- src/winio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/winio.c b/src/winio.c index b702a30c..7ef47451 100644 --- a/src/winio.c +++ b/src/winio.c @@ -2404,11 +2404,12 @@ void draw_row(int row, const char *converted, linestruct *line, size_t from_col) wattron(edit, interface_color_pair[LINE_NUMBER]); #ifndef NANO_TINY if (ISSET(SOFTWRAP) && from_col != 0) - mvwprintw(edit, row, 0, "%*s", margin, " "); + mvwprintw(edit, row, 0, "%*s", margin - 1, " "); else #endif - mvwprintw(edit, row, 0, "%*zd ", margin - 1, line->lineno); + mvwprintw(edit, row, 0, "%*zd", margin - 1, line->lineno); wattroff(edit, interface_color_pair[LINE_NUMBER]); + wprintw(edit, " "); } #endif