File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -171,3 +171,30 @@ func Test_abbr_after_line_join()
171171 unabbr foo
172172 set backspace &
173173endfunc
174+
175+ func Test_map_timeout ()
176+ nnoremap aaaa :let got_aaaa = 1<CR>
177+ nnoremap bb :let got_bb = 1<CR>
178+ nmap b aaa
179+ new
180+ func ExitInsert (timer)
181+ let g: line = getline (1 )
182+ call feedkeys (" \<Esc> " , " t" )
183+ endfunc
184+ set timeout timeoutlen = 200
185+ call timer_start (300 , ' ExitInsert' )
186+ " After the 'b' Vim waits for another character to see if it matches 'bb'.
187+ " When it times out it is expanded to "aaa", but there is no wait for
188+ " "aaaa". Can't check that reliably though.
189+ call feedkeys (" b" , " xt!" )
190+ call assert_equal (" aa" , g: line )
191+ call assert_false (exists (' got_aaa' ))
192+ call assert_false (exists (' got_bb' ))
193+
194+ bwipe!
195+ nunmap aaaa
196+ nunmap bb
197+ nunmap b
198+ set timeoutlen &
199+ delfunc ExitInsert
200+ endfunc
Original file line number Diff line number Diff line change @@ -764,6 +764,8 @@ static char *(features[]) =
764764
765765static int included_patches [] =
766766{ /* Add new patch number below this line */
767+ /**/
768+ 586 ,
767769/**/
768770 585 ,
769771/**/
You can’t perform that action at this time.
0 commit comments