From 583f5aee96940c29ba17ffb87f1ddf56741b72ba Mon Sep 17 00:00:00 2001 From: Christ van Willegen Date: Sun, 30 Mar 2025 15:26:01 +0200 Subject: [PATCH] patch 9.1.1263: string length wrong in get_last_inserted_save() Problem: string length wrong in get_last_inserted_save() (after v9.1.1222) Solution: when removing trailing ESC, also decrease the string length (Christ van Willegen) closes: #16961 Signed-off-by: Christ van Willegen Signed-off-by: Christian Brabandt --- src/edit.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/edit.c b/src/edit.c index a2a004c124..3fa95cdb05 100644 --- a/src/edit.c +++ b/src/edit.c @@ -3022,7 +3022,7 @@ get_last_insert_save(void) return NULL; if (insert.length > 0 && s[insert.length - 1] == ESC) // remove trailing ESC - s[insert.length - 1] = NUL; + s[--insert.length] = NUL; return s; } diff --git a/src/version.c b/src/version.c index ec6acb6105..75cbd635dc 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1263, /**/ 1262, /**/