Does popup_menu() functions asynchronous?

9 views
Skip to first unread message

Piotr Kolasiński

unread,
Mar 3, 2026, 3:41:56 AM (yesterday) Mar 3
to vim_use
I try to use popup_menu() in linear code like:

——

func PopupResult(id, sel)
    let g:popup_sel = a:result
    echo "In popup: " .. g:result
endfunc

call popup_menu(["A","B","C"], #{ callback: 'PopupResult' })

echo 'After popup'

——-

but 'After popup’ is displayed immediately, not waiting for finish the call. 
Does popup_menu works asynchronous? How can I execute such code in linear way?

Piotr
Reply all
Reply to author
Forward
0 new messages