forked from aniani/vim
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 <cvwillegen@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
f13c856154
commit
583f5aee96
@@ -3022,7 +3022,7 @@ get_last_insert_save(void)
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (insert.length > 0 && s[insert.length - 1] == ESC) // remove trailing ESC
|
if (insert.length > 0 && s[insert.length - 1] == ESC) // remove trailing ESC
|
||||||
s[insert.length - 1] = NUL;
|
s[--insert.length] = NUL;
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -704,6 +704,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1263,
|
||||||
/**/
|
/**/
|
||||||
1262,
|
1262,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user