0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 9.0.0288: when 'cmdheight' is zero some messages are not displayed

Problem:    When 'cmdheight' is zero some messages are not displayed.
Solution:   Use a popup notification window.
This commit is contained in:
Bram Moolenaar
2022-08-27 21:30:03 +01:00
parent aebc6ef7cd
commit 9198de3ae2
12 changed files with 382 additions and 49 deletions

View File

@@ -464,10 +464,20 @@ create_timer(long msec, int repeat)
timer->tr_repeat = repeat - 1;
timer->tr_interval = msec;
profile_setlimit(msec, &timer->tr_due);
timer_start(timer);
return timer;
}
/*
* (Re)start a timer.
*/
void
timer_start(timer_T *timer)
{
profile_setlimit(timer->tr_interval, &timer->tr_due);
timer->tr_paused = FALSE;
}
/*
* Invoke the callback of "timer".
*/
@@ -603,8 +613,13 @@ check_due_timer(void)
else
{
this_due = -1;
remove_timer(timer);
free_timer(timer);
if (timer->tr_keep)
timer->tr_paused = TRUE;
else
{
remove_timer(timer);
free_timer(timer);
}
}
}
if (this_due > 0 && (next_due == -1 || next_due > this_due))
@@ -826,6 +841,7 @@ f_timer_pause(typval_T *argvars, typval_T *rettv UNUSED)
else
{
int paused = (int)tv_get_bool(&argvars[1]);
timer = find_timer((int)tv_get_number(&argvars[0]));
if (timer != NULL)
timer->tr_paused = paused;