nano

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

commit 6620acbff4455ed732b9f7decbddba297ef2aa4a
parent 1cb6619d6acdf72a634686b6e39cabfa9b9c3361
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Tue, 20 Dec 2016 10:03:53 +0100

tweaks: use a faster comparison

Diffstat:
Msrc/text.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/text.c b/src/text.c @@ -1220,7 +1220,7 @@ void add_undo(undo_type action) openfile->current->data[0] != '\0') u->xflags = WAS_FINAL_BACKSPACE; case DEL: - if (u->begin != strlen(openfile->current->data)) { + if (openfile->current->data[openfile->current_x] != '\0') { char *char_buf = charalloc(mb_cur_max() + 1); int char_len = parse_mbchar(&openfile->current->data[u->begin], char_buf, NULL);