1
0
forked from aniani/vim

patch 8.2.3187: Vim9: popup timer callback is not compiled

Problem:    Vim9: popup timer callback is not compiled.
Solution:   Compile the callback when creating the timer.
This commit is contained in:
Bram Moolenaar
2021-07-19 22:19:29 +02:00
parent 605793500b
commit 9bb0dad0d8
4 changed files with 46 additions and 2 deletions

View File

@@ -383,8 +383,8 @@ popup_add_timeout(win_T *wp, int time)
typval_T tv;
vim_snprintf((char *)cbbuf, sizeof(cbbuf),
"{_ -> popup_close(%d)}", wp->w_id);
if (get_lambda_tv(&ptr, &tv, FALSE, &EVALARG_EVALUATE) == OK)
"(_) => popup_close(%d)", wp->w_id);
if (get_lambda_tv_and_compile(&ptr, &tv, FALSE, &EVALARG_EVALUATE) == OK)
{
wp->w_popup_timer = create_timer(time, 0);
wp->w_popup_timer->tr_callback = get_callback(&tv);