From 6620acbff4455ed732b9f7decbddba297ef2aa4a Mon Sep 17 00:00:00 2001 From: Benno Schulenberg <bensberg@justemail.net> Date: Tue, 20 Dec 2016 10:03:53 +0100 Subject: [PATCH] tweaks: use a faster comparison --- src/text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/text.c b/src/text.c index 69b99b37..1eb711ad 100644 --- 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); -- GitLab