diff --git a/src/winio.c b/src/winio.c index 6be8134a8a36c57f81595e1f71032b706b5537ab..8c9d55ec35136d7a623a19ae4393dacacc5fb8fe 100644 --- a/src/winio.c +++ b/src/winio.c @@ -2318,7 +2318,7 @@ void edit_draw(filestruct *fileptr, const char *converted, int if (margin > 0) { wattron(edit, interface_color_pair[LINE_NUMBER]); #ifndef NANO_TINY - if (ISSET(SOFTWRAP) && from_x >= editwincols) + if (ISSET(SOFTWRAP) && from_x != 0) mvwprintw(edit, line, 0, "%*s", margin - 1, " "); else #endif @@ -2665,8 +2665,6 @@ void edit_draw(filestruct *fileptr, const char *converted, int x_start = 0; } - assert(x_start >= 0 && x_start <= strlen(converted)); - index = actual_x(converted, x_start); if (paintlen > 0)