summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_balloon.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-07-05 23:24:56 +0200
committerBram Moolenaar <Bram@vim.org>2019-07-05 23:24:56 +0200
commitc2f5054be9301c8a47b92a4584338cb2de24b96c (patch)
tree55dba620959da6fdf7485c5039590dbeda66eb2a /src/testdir/test_balloon.vim
parent28fc247f8d94a1cfabbcf2691ca942bde96f6d2f (diff)
patch 8.1.1640: the CursorHold autocommand takes down a balloonv8.1.1640
Problem: The CursorHold autocommand takes down a balloon. (Paul Jolly) Solution: Ignore the CursorHold pseudo-key.
Diffstat (limited to 'src/testdir/test_balloon.vim')
-rw-r--r--src/testdir/test_balloon.vim20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/testdir/test_balloon.vim b/src/testdir/test_balloon.vim
index b3c680e111..796cb23f67 100644
--- a/src/testdir/test_balloon.vim
+++ b/src/testdir/test_balloon.vim
@@ -25,16 +25,28 @@ let s:common_script =<< trim [CODE]
func Test_balloon_eval_term()
" Use <Ignore> after <MouseMove> to return from vgetc() without removing
" the balloon.
- call writefile(s:common_script + [
- \ 'call test_setmouse(2, 6)',
- \ 'call feedkeys("\<MouseMove>\<Ignore>", "xt")',
- \ ], 'XTest_beval')
+ let xtra_lines =<< trim [CODE]
+ set updatetime=300
+ au CursorHold * echo 'hold fired'
+ func Trigger()
+ call test_setmouse(2, 6)
+ call feedkeys("\<MouseMove>\<Ignore>", "xt")
+ endfunc
+ [CODE]
+ call writefile(s:common_script + xtra_lines, 'XTest_beval')
" Check that the balloon shows up after a mouse move
let buf = RunVimInTerminal('-S XTest_beval', {'rows': 10, 'cols': 50})
call term_wait(buf, 100)
+ call term_sendkeys(buf, 'll')
+ call term_sendkeys(buf, ":call Trigger()\<CR>")
call VerifyScreenDump(buf, 'Test_balloon_eval_term_01', {})
+ " Make sure the balloon still shows after 'updatetime' passed and CursorHold
+ " was triggered.
+ call term_wait(buf, 300)
+ call VerifyScreenDump(buf, 'Test_balloon_eval_term_01a', {})
+
" clean up
call StopVimInTerminal(buf)
call delete('XTest_beval')