File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -1871,7 +1871,7 @@ getcmdline_int(
18711871 // that occurs while typing a command should
18721872 // cause the command not to be executed.
18731873
1874- if (stuff_empty () && typebuf .tb_len == 0 )
1874+ if (ex_normal_busy == 0 && stuff_empty () && typebuf .tb_len == 0 )
18751875 // There is no pending input from sources other than user input, so
18761876 // Vim is going to wait for the user to type a key. Consider the
18771877 // command line typed even if next key will trigger a mapping.
Original file line number Diff line number Diff line change @@ -2675,6 +2675,7 @@ func Test_recalling_cmdline_with_mappings()
26752675 call assert_equal (" echo 'bar'" , histget (' :' , -1 ))
26762676 call assert_equal (" echo 'foo'" , histget (' :' , -2 ))
26772677
2678+ let g: cmdline = ' '
26782679 " This command comes completely from a mapping.
26792680 nmap <F3> :echo 'baz'<F2><CR>
26802681 call feedkeys (" \<F3> " , ' tx' )
@@ -2684,6 +2685,15 @@ func Test_recalling_cmdline_with_mappings()
26842685 call assert_equal (" echo 'bar'" , histget (' :' , -1 ))
26852686 call assert_equal (" echo 'foo'" , histget (' :' , -2 ))
26862687
2688+ let g: cmdline = ' '
2689+ " A command coming from :normal is ignored in the history even if the keys
2690+ " don't explicitly leave Cmdline mode.
2691+ exe " normal :echo 'baz'\<F2> "
2692+ call assert_equal (" echo 'baz'" , g: cmdline )
2693+ call assert_equal (" echo 'bar'" , @: )
2694+ call assert_equal (" echo 'bar'" , histget (' :' , -1 ))
2695+ call assert_equal (" echo 'foo'" , histget (' :' , -2 ))
2696+
26872697 if has (' unix' )
26882698 new
26892699 call setline (1 , [' aaa' ])
Original file line number Diff line number Diff line change @@ -734,6 +734,8 @@ static char *(features[]) =
734734
735735static int included_patches [] =
736736{ /* Add new patch number below this line */
737+ /**/
738+ 2107 ,
737739/**/
738740 2106 ,
739741/**/
You can’t perform that action at this time.
0 commit comments