vim-patch:9.0.0009: going past the end of a menu item with only modifier

Problem:    Going past the end of a menu item with only modifier.
Solution:   Check for NUL.
083692d598
This commit is contained in:
zeertzjq
2022-08-05 07:57:41 +08:00
parent 57fbcc6929
commit 3aef2b8bdf
2 changed files with 15 additions and 2 deletions

View File

@@ -1748,8 +1748,8 @@ const char *str2special(const char **const sp, const bool replace_spaces, const
*sp = str + 1;
}
} else {
// single-byte character or illegal byte
*sp = str + 1;
// single-byte character, NUL or illegal byte
*sp = str + (*str == NUL ? 0 : 1);
}
// Make special keys and C0 control characters in <> form, also <M-Space>.