Patch 8.0.0586

20 views
Skip to first unread message

Bram Moolenaar

unread,
Apr 23, 2017, 12:49:58 PM4/23/17
to vim...@googlegroups.com

Patch 8.0.0586
Problem: No test for mapping timing out.
Solution: Add a test.
Files: src/testdir/test_mapping.vim


*** ../vim-8.0.0585/src/testdir/test_mapping.vim 2017-04-01 15:15:48.284089660 +0200
--- src/testdir/test_mapping.vim 2017-04-01 16:01:38.611351079 +0200
***************
*** 171,173 ****
--- 171,200 ----
unabbr foo
set backspace&
endfunc
+
+ func Test_map_timeout()
+ nnoremap aaaa :let got_aaaa = 1<CR>
+ nnoremap bb :let got_bb = 1<CR>
+ nmap b aaa
+ new
+ func ExitInsert(timer)
+ let g:line = getline(1)
+ call feedkeys("\<Esc>", "t")
+ endfunc
+ set timeout timeoutlen=200
+ call timer_start(300, 'ExitInsert')
+ " After the 'b' Vim waits for another character to see if it matches 'bb'.
+ " When it times out it is expanded to "aaa", but there is no wait for
+ " "aaaa". Can't check that reliably though.
+ call feedkeys("b", "xt!")
+ call assert_equal("aa", g:line)
+ call assert_false(exists('got_aaa'))
+ call assert_false(exists('got_bb'))
+
+ bwipe!
+ nunmap aaaa
+ nunmap bb
+ nunmap b
+ set timeoutlen&
+ delfunc ExitInsert
+ endfunc
*** ../vim-8.0.0585/src/version.c 2017-04-23 18:44:22.985227930 +0200
--- src/version.c 2017-04-23 18:49:16.107372816 +0200
***************
*** 766,767 ****
--- 766,769 ----
{ /* Add new patch number below this line */
+ /**/
+ 586,
/**/

--
Proofread carefully to see if you any words out.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages