summaryrefslogtreecommitdiff
path: root/src/popupwin.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-07-19 22:19:29 +0200
committerBram Moolenaar <Bram@vim.org>2021-07-19 22:19:29 +0200
commit9bb0dad0d8283c86fddf5b950f4fbb6fb8f12741 (patch)
treee9163a4ab88cd8d8186929f3efc77caac43512bc /src/popupwin.c
parent605793500b351ee92483d04b1e03fb8af30dd101 (diff)
downloadvim-git-9bb0dad0d8283c86fddf5b950f4fbb6fb8f12741.tar.gz
patch 8.2.3187: Vim9: popup timer callback is not compiledv8.2.3187
Problem: Vim9: popup timer callback is not compiled. Solution: Compile the callback when creating the timer.
Diffstat (limited to 'src/popupwin.c')
-rw-r--r--src/popupwin.c4
1 files changed, 2 insertions, 2 deletions
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);