nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 55159b7b39f8201967001e8381954f1d474d657a
parent 0389a1d93900f0832f2ffaeed7507db877a6d331
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Sun, 19 Mar 2017 17:13:29 +0100

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.

Diffstat:
Msrc/winio.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/winio.c b/src/winio.c @@ -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