Mercurial > vim
comparison src/testdir/test_balloon.vim @ 16594:6f52e82d9d4e v8.1.1300
patch 8.1.1300: in a terminal 'ballooneval' does not work right away
commit https://github.com/vim/vim/commit/2f10658b06bbdd8f25c4ff152266c808234cee0a
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed May 8 21:59:25 2019 +0200
patch 8.1.1300: in a terminal 'ballooneval' does not work right away
Problem: In a terminal 'ballooneval' does not work right away.
Solution: Flush output after drawing the balloon. Add the <Ignore> key
code. Add a test.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 08 May 2019 22:00:05 +0200 |
parents | |
children | fd0d29d63b85 |
comparison
equal
deleted
inserted
replaced
16593:2181d6152fd1 | 16594:6f52e82d9d4e |
---|---|
1 " Tests for 'balloonevalterm'. | |
2 | |
3 if !has('balloon_eval_term') || has('gui_running') | |
4 finish | |
5 endif | |
6 | |
7 source screendump.vim | |
8 if !CanRunVimInTerminal() | |
9 finish | |
10 endif | |
11 | |
12 func Test_balloon_eval_term() | |
13 call writefile([ | |
14 \ 'call setline(1, ["one one one", "two tXo two", "three three three"])', | |
15 \ 'set balloonevalterm balloonexpr=MyBalloonExpr() balloondelay=100', | |
16 \ 'func MyBalloonExpr()', | |
17 \ ' return "line " . v:beval_lnum . " column " . v:beval_col', | |
18 \ 'endfun', | |
19 \ 'redraw', | |
20 \ 'call test_setmouse(2, 6)', | |
21 \ 'call feedkeys("\<MouseMove>\<Ignore>", "xt")', | |
22 \ ], 'XTest_beval') | |
23 | |
24 " Check that the balloon shows up | |
25 let buf = RunVimInTerminal('-S XTest_beval', {'rows': 10, 'cols': 50}) | |
26 call term_wait(buf, 100) | |
27 call VerifyScreenDump(buf, 'Test_balloon_eval_term_01', {}) | |
28 | |
29 " clean up | |
30 call StopVimInTerminal(buf) | |
31 call delete('XTest_beval') | |
32 endfunc |