mirror of
https://github.com/vim/vim.git
synced 2025-07-25 10:54:51 -04:00
patch 8.1.1640: the CursorHold autocommand takes down a balloon
Problem: The CursorHold autocommand takes down a balloon. (Paul Jolly) Solution: Ignore the CursorHold pseudo-key.
This commit is contained in:
parent
28fc247f8d
commit
c2f5054be9
@ -1794,7 +1794,7 @@ vgetc(void)
|
|||||||
may_garbage_collect = FALSE;
|
may_garbage_collect = FALSE;
|
||||||
#endif
|
#endif
|
||||||
#ifdef FEAT_BEVAL_TERM
|
#ifdef FEAT_BEVAL_TERM
|
||||||
if (c != K_MOUSEMOVE && c != K_IGNORE)
|
if (c != K_MOUSEMOVE && c != K_IGNORE && c != K_CURSORHOLD)
|
||||||
{
|
{
|
||||||
/* Don't trigger 'balloonexpr' unless only the mouse was moved. */
|
/* Don't trigger 'balloonexpr' unless only the mouse was moved. */
|
||||||
bevalexpr_due_set = FALSE;
|
bevalexpr_due_set = FALSE;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
>o+0&#ffffff0|n|e| |o|n|e| |o|n|e| @38
|
|o+0&#ffffff0|n>e| |o|n|e| |o|n|e| @38
|
||||||
@2|o| |t|X|o| |t|w|o| @38
|
@2|o| |t|X|o| |t|w|o| @38
|
||||||
|t|h|r|e| +0#0000001#ffd7ff255@21| +0#0000000#ffffff0@23
|
|t|h|r|e| +0#0000001#ffd7ff255@21| +0#0000000#ffffff0@23
|
||||||
|~+0#4040ff13&| @2| +0#0000001#ffd7ff255|l|i|n|e| |2| |c|o|l|u|m|n| |6|:| |t|X|o| | +0#4040ff13#ffffff0@23
|
|~+0#4040ff13&| @2| +0#0000001#ffd7ff255|l|i|n|e| |2| |c|o|l|u|m|n| |6|:| |t|X|o| | +0#4040ff13#ffffff0@23
|
||||||
@ -7,4 +7,4 @@
|
|||||||
|~| @48
|
|~| @48
|
||||||
|~| @48
|
|~| @48
|
||||||
|~| @48
|
|~| @48
|
||||||
| +0#0000000&@31|1|,|1| @10|A|l@1|
|
|:+0#0000000&|c|a|l@1| |T|r|i|g@1|e|r|(|)| @16|1|,|3| @10|A|l@1|
|
||||||
|
10
src/testdir/dumps/Test_balloon_eval_term_01a.dump
Normal file
10
src/testdir/dumps/Test_balloon_eval_term_01a.dump
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
|o+0&#ffffff0|n>e| |o|n|e| |o|n|e| @38
|
||||||
|
@2|o| |t|X|o| |t|w|o| @38
|
||||||
|
|t|h|r|e| +0#0000001#ffd7ff255@21| +0#0000000#ffffff0@23
|
||||||
|
|~+0#4040ff13&| @2| +0#0000001#ffd7ff255|l|i|n|e| |2| |c|o|l|u|m|n| |6|:| |t|X|o| | +0#4040ff13#ffffff0@23
|
||||||
|
|~| @2| +0#0000001#ffd7ff255@21| +0#4040ff13#ffffff0@23
|
||||||
|
|~| @48
|
||||||
|
|~| @48
|
||||||
|
|~| @48
|
||||||
|
|~| @48
|
||||||
|
|h+0#0000000&|o|l|d| |f|i|r|e|d| @39
|
@ -25,16 +25,28 @@ let s:common_script =<< trim [CODE]
|
|||||||
func Test_balloon_eval_term()
|
func Test_balloon_eval_term()
|
||||||
" Use <Ignore> after <MouseMove> to return from vgetc() without removing
|
" Use <Ignore> after <MouseMove> to return from vgetc() without removing
|
||||||
" the balloon.
|
" the balloon.
|
||||||
call writefile(s:common_script + [
|
let xtra_lines =<< trim [CODE]
|
||||||
\ 'call test_setmouse(2, 6)',
|
set updatetime=300
|
||||||
\ 'call feedkeys("\<MouseMove>\<Ignore>", "xt")',
|
au CursorHold * echo 'hold fired'
|
||||||
\ ], 'XTest_beval')
|
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
|
" Check that the balloon shows up after a mouse move
|
||||||
let buf = RunVimInTerminal('-S XTest_beval', {'rows': 10, 'cols': 50})
|
let buf = RunVimInTerminal('-S XTest_beval', {'rows': 10, 'cols': 50})
|
||||||
call term_wait(buf, 100)
|
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', {})
|
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
|
" clean up
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
call delete('XTest_beval')
|
call delete('XTest_beval')
|
||||||
|
@ -777,6 +777,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1640,
|
||||||
/**/
|
/**/
|
||||||
1639,
|
1639,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user