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.
This commit is contained in:
David Lawrence Ramsey
2017-08-18 16:43:09 -05:00
committed by Benno Schulenberg
parent 873f99d96a
commit 5fcda555ea

View File

@@ -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