static timer_T *first_timer = NULL;
static long last_timer_id = 0;
+/*
+ * Return time left until "due". Negative if past "due".
+ */
long
proftime_time_left(proftime_T *due, proftime_T *now)
{
balloonEvalForTerm = TRUE;
}
if (balloonEval != NULL)
+ {
general_beval_cb(balloonEval, 0);
+ setcursor();
+ out_flush();
+ }
}
else if (next_due == -1 || next_due > this_due)
next_due = this_due;
#endif
{K_PLUG, (char_u *)"Plug"},
{K_CURSORHOLD, (char_u *)"CursorHold"},
+ {K_IGNORE, (char_u *)"Ignore"},
{0, NULL}
/* NOTE: When adding a long name update MAX_KEY_NAME_LEN. */
};
--- /dev/null
+>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@16| +0#0000000#ffffff0@28
+|~+0#4040ff13&| @2| +0#0000001#ffd7ff255|l|i|n|e| |2| |c|o|l|u|m|n| |6| | +0#4040ff13#ffffff0@28
+|~| @2| +0#0000001#ffd7ff255@16| +0#4040ff13#ffffff0@28
+|~| @48
+|~| @48
+|~| @48
+|~| @48
+| +0#0000000&@31|1|,|1| @10|A|l@1|
--- /dev/null
+" Tests for 'balloonevalterm'.
+
+if !has('balloon_eval_term') || has('gui_running')
+ finish
+endif
+
+source screendump.vim
+if !CanRunVimInTerminal()
+ finish
+endif
+
+func Test_balloon_eval_term()
+ call writefile([
+ \ 'call setline(1, ["one one one", "two tXo two", "three three three"])',
+ \ 'set balloonevalterm balloonexpr=MyBalloonExpr() balloondelay=100',
+ \ 'func MyBalloonExpr()',
+ \ ' return "line " . v:beval_lnum . " column " . v:beval_col',
+ \ 'endfun',
+ \ 'redraw',
+ \ 'call test_setmouse(2, 6)',
+ \ 'call feedkeys("\<MouseMove>\<Ignore>", "xt")',
+ \ ], 'XTest_beval')
+
+ " Check that the balloon shows up
+ 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')
+endfunc