mirror of
git://git.sv.gnu.org/nano.git
synced 2025-01-05 00:54:26 +03:00
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:
parent
0389a1d939
commit
55159b7b39
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user