From 9bb0dad0d8283c86fddf5b950f4fbb6fb8f12741 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 19 Jul 2021 22:19:29 +0200 Subject: 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. --- src/popupwin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/popupwin.c') diff --git a/src/popupwin.c b/src/popupwin.c index 0f6166aca..747852735 100644 --- a/src/popupwin.c +++ b/src/popupwin.c @@ -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); -- cgit v1.2.1