@@ -25,16 +25,28 @@ let s:common_script =<< trim [CODE]
2525func Test_balloon_eval_term ()
2626 " Use <Ignore> after <MouseMove> to return from vgetc() without removing
2727 " the balloon.
28- call writefile (s: common_script + [
29- \ ' call test_setmouse(2, 6)' ,
30- \ ' call feedkeys("\<MouseMove>\<Ignore>", "xt")' ,
31- \ ], ' XTest_beval' )
28+ let xtra_lines = << trim [CODE]
29+ set updatetime = 300
30+ au CursorHold * echo ' hold fired'
31+ func Trigger ()
32+ call test_setmouse (2 , 6 )
33+ call feedkeys (" \<MouseMove>\<Ignore> " , " xt" )
34+ endfunc
35+ [CODE]
36+ call writefile (s: common_script + xtra_lines, ' XTest_beval' )
3237
3338 " Check that the balloon shows up after a mouse move
3439 let buf = RunVimInTerminal (' -S XTest_beval' , {' rows' : 10 , ' cols' : 50 })
3540 call term_wait (buf , 100 )
41+ call term_sendkeys (buf , ' ll' )
42+ call term_sendkeys (buf , " :call Trigger()\<CR> " )
3643 call VerifyScreenDump (buf , ' Test_balloon_eval_term_01' , {})
3744
45+ " Make sure the balloon still shows after 'updatetime' passed and CursorHold
46+ " was triggered.
47+ call term_wait (buf , 300 )
48+ call VerifyScreenDump (buf , ' Test_balloon_eval_term_01a' , {})
49+
3850 " clean up
3951 call StopVimInTerminal (buf )
4052 call delete (' XTest_beval' )
0 commit comments