summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-04-23 18:49:36 +0200
committerBram Moolenaar <Bram@vim.org>2017-04-23 18:49:36 +0200
commitb7637c44c26b057d1f3721d932bbab06d9f74393 (patch)
tree09de85769ffa62a35b15bddf634cd53a91bf9b16
parent86e5792906621be5a6c4a1de9b8852e9caf65ea1 (diff)
downloadvim-git-b7637c44c26b057d1f3721d932bbab06d9f74393.tar.gz
patch 8.0.0586: no test for mapping timing outv8.0.0586
Problem: No test for mapping timing out. Solution: Add a test.
-rw-r--r--src/testdir/test_mapping.vim27
-rw-r--r--src/version.c2
2 files changed, 29 insertions, 0 deletions
diff --git a/src/testdir/test_mapping.vim b/src/testdir/test_mapping.vim
index ab02a87e1..5026d6b2b 100644
--- a/src/testdir/test_mapping.vim
+++ b/src/testdir/test_mapping.vim
@@ -171,3 +171,30 @@ func Test_abbr_after_line_join()
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
diff --git a/src/version.c b/src/version.c
index 47dd973b0..3e683e80f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 586,
+/**/
585,
/**/
584,