Patch 8.1.1640
Problem: The CursorHold autocommand takes down a balloon. (Paul Jolly)
Solution: Ignore the CursorHold pseudo-key.
Files: src/getchar.c, src/testdir/test_balloon.vim,
src/testdir/dumps/Test_balloon_eval_term_01.dump,
src/testdir/dumps/Test_balloon_eval_term_01a.dump
*** ../vim-8.1.1639/src/getchar.c 2019-06-25 06:27:57.537385321 +0200
--- src/getchar.c 2019-07-05 23:20:09.919535761 +0200
***************
*** 1794,1800 ****
may_garbage_collect = FALSE;
#endif
#ifdef FEAT_BEVAL_TERM
! if (c != K_MOUSEMOVE && c != K_IGNORE)
{
/* Don't trigger 'balloonexpr' unless only the mouse was moved. */
bevalexpr_due_set = FALSE;
--- 1794,1800 ----
may_garbage_collect = FALSE;
#endif
#ifdef FEAT_BEVAL_TERM
! if (c != K_MOUSEMOVE && c != K_IGNORE && c != K_CURSORHOLD)
{
/* Don't trigger 'balloonexpr' unless only the mouse was moved. */
bevalexpr_due_set = FALSE;
*** ../vim-8.1.1639/src/testdir/test_balloon.vim 2019-06-24 00:58:02.904020530 +0200
--- src/testdir/test_balloon.vim 2019-07-05 23:22:57.490917940 +0200
***************
*** 25,40 ****
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')
" 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 VerifyScreenDump(buf, 'Test_balloon_eval_term_01', {})
" clean up
call StopVimInTerminal(buf)
call delete('XTest_beval')
--- 25,52 ----
func Test_balloon_eval_term()
" Use <Ignore> after <MouseMove> to return from vgetc() without removing
" the balloon.
! 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')
*** ../vim-8.1.1639/src/testdir/dumps/Test_balloon_eval_term_01.dump 2019-05-08 22:54:26.023509040 +0200
--- src/testdir/dumps/Test_balloon_eval_term_01.dump 2019-07-05 23:17:30.532018086 +0200
***************
*** 1,4 ****
! >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
--- 1,4 ----
! |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
***************
*** 7,10 ****
|~| @48
|~| @48
|~| @48
! | +0#0000000&@31|1|,|1| @10|A|l@1|
--- 7,10 ----
|~| @48
|~| @48
|~| @48
! |:+0#0000000&|c|a|l@1| |T|r|i|g@1|e|r|(|)| @16|1|,|3| @10|A|l@1|
*** ../vim-8.1.1639/src/testdir/dumps/Test_balloon_eval_term_01a.dump 2019-07-05 23:24:21.390576137 +0200
--- src/testdir/dumps/Test_balloon_eval_term_01a.dump 2019-07-05 23:20:20.067501227 +0200
***************
*** 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
*** ../vim-8.1.1639/src/version.c 2019-07-05 22:14:12.086117124 +0200
--- src/version.c 2019-07-05 23:08:47.765846475 +0200
***************
*** 779,780 ****
--- 779,782 ----
{ /* Add new patch number below this line */
+ /**/
+ 1640,
/**/
--
MORTICIAN: Bring out your dead!
[clang]
Bring out your dead!
[clang]
Bring out your dead!
CUSTOMER: Here's one -- nine pence.
DEAD PERSON: I'm not dead!
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language --
http://www.Zimbu.org ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///