0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

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.
This commit is contained in:
Bram Moolenaar
2022-06-29 21:16:58 +01:00
parent 83e11800cc
commit 083692d598
3 changed files with 17 additions and 2 deletions

View File

@@ -1820,8 +1820,8 @@ str2special(
*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>.
// Use <Space> only for lhs of a mapping.