diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-06-29 21:16:58 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-06-29 21:16:58 +0100 |
commit | 083692d598139228e101b8c521aaef7bcf256e9a (patch) | |
tree | 237ad8cec0b948b2793e040fa7b8957e0f97fbd8 /src/testdir/test_menu.vim | |
parent | 83e11800cc3775de3135ac7d823137c8c1e87fa1 (diff) |
patch 9.0.0009: going past the end of a menu item with only modifierv9.0.0009
Problem: Going past the end of a menu item with only modifier.
Solution: Check for NUL.
Diffstat (limited to 'src/testdir/test_menu.vim')
-rw-r--r-- | src/testdir/test_menu.vim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/testdir/test_menu.vim b/src/testdir/test_menu.vim index c867162e5b..df717cc8a7 100644 --- a/src/testdir/test_menu.vim +++ b/src/testdir/test_menu.vim @@ -528,4 +528,17 @@ func Test_tmenu() tunmenu Test endfunc +func Test_only_modifier() + exe "tmenu a.b \x80\xfc0" + let exp =<< trim [TEXT] + --- Menus --- + 500 a + 500 b + t - <T-2-^@> + [TEXT] + call assert_equal(exp, split(execute('tmenu'), "\n")) + + tunmenu a.b +endfunc + " vim: shiftwidth=2 sts=2 expandtab |