+2015-12-07 Benno Schulenberg <bensberg@justemail.net>
+ * src/winio.c (edit_draw): Quit the loop when there is no end match.
+
GNU nano 2.5.0 - 2015.12.05
2015-12-05 Chris Allegretta <chrisa@asty.org>
0, NULL, 0) == REG_NOMATCH)
end_line = end_line->next;
- if (end_line != NULL) {
- assert(0 <= x_start && x_start < COLS);
+ /* If there is no end, we're done on this line. */
+ if (end_line == NULL)
+ break;
- mvwaddnstr(edit, line, x_start,
- converted + index, -1);
- fileptr->multidata[tmpcolor->id] = CENDAFTER;
+ assert(0 <= x_start && x_start < COLS);
+
+ /* Paint the rest of the line. */
+ mvwaddnstr(edit, line, x_start, converted + index, -1);
+ fileptr->multidata[tmpcolor->id] = CENDAFTER;
#ifdef DEBUG
fprintf(stderr, " Marking for id %i line %i as CENDAFTER\n", tmpcolor->id, line);
#endif
- /* We painted to the end of the line, so
- * don't bother checking any more starts. */
- break;
- }
- start_col = startmatch.rm_so + 1;
+ /* We've painted to the end of the line, so don't
+ * bother checking for any more starts. */
+ break;
}
}
}