File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1820,8 +1820,8 @@ str2special(
18201820 * sp = str + 1 ;
18211821 }
18221822 else
1823- // single-byte character or illegal byte
1824- * sp = str + 1 ;
1823+ // single-byte character, NUL or illegal byte
1824+ * sp = str + ( * str == NUL ? 0 : 1 ) ;
18251825
18261826 // Make special keys and C0 control characters in <> form, also <M-Space>.
18271827 // Use <Space> only for lhs of a mapping.
Original file line number Diff line number Diff line change @@ -528,4 +528,17 @@ func Test_tmenu()
528528 tunmenu Test
529529endfunc
530530
531+ func Test_only_modifier ()
532+ exe " tmenu a.b \x80\xfc 0"
533+ let exp = << trim [TEXT]
534+ --- Menus ---
535+ 500 a
536+ 500 b
537+ t - <T-2-^@>
538+ [TEXT]
539+ call assert_equal (exp , split (execute (' tmenu' ), " \n " ))
540+
541+ tunmenu a .b
542+ endfunc
543+
531544" vim: shiftwidth = 2 sts = 2 expandtab
Original file line number Diff line number Diff line change @@ -735,6 +735,8 @@ static char *(features[]) =
735735
736736static int included_patches [] =
737737{ /* Add new patch number below this line */
738+ /**/
739+ 9 ,
738740/**/
739741 8 ,
740742/**/
You can’t perform that action at this time.
0 commit comments