painting: don't try to start highlighting before column zero

This could happen when a tab or a double-width character straddles
the boundary between two softwrapped chunks.
This commit is contained in:
Benno Schulenberg 2017-03-19 17:13:29 +01:00
parent 0389a1d939
commit 55159b7b39

View File

@ -2624,6 +2624,9 @@ void edit_draw(filestruct *fileptr, const char *converted,
/* Compute on which screen column to start painting. */
start_col = strnlenpt(fileptr->data, top_x) - from_col;
if (start_col < 0)
start_col = 0;
thetext = converted + actual_x(converted, start_col);
/* If the end of the mark is onscreen, compute how many