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.
This commit is contained in:
Benno Schulenberg 2019-12-15 14:23:32 +01:00
parent 26d88ccbb1
commit 9631e858f2
1 changed files with 3 additions and 2 deletions

View File

@ -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]); wattron(edit, interface_color_pair[LINE_NUMBER]);
#ifndef NANO_TINY #ifndef NANO_TINY
if (ISSET(SOFTWRAP) && from_col != 0) if (ISSET(SOFTWRAP) && from_col != 0)
mvwprintw(edit, row, 0, "%*s", margin, " "); mvwprintw(edit, row, 0, "%*s", margin - 1, " ");
else else
#endif #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]); wattroff(edit, interface_color_pair[LINE_NUMBER]);
wprintw(edit, " ");
} }
#endif #endif