Re: Does popup_menu() functions asynchronous?
M <[email protected]> Mon, 16 Mar 2026 19:01:29 +0300
| Newsgroups | gmane.editors.vim |
|---|---|
| Message-ID | <CAFsTB+Ji3kYZHDdW6vw9nLBdkqK90z8Xdt-qabFzsimWpiXrMg@mail.gmail.com> |
--0000000000000b7809064d265605 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =D0=BF=D0=BD, 16 =D0=BC=D0=B0=D1=80. 2026 =D0=B3., 18:54 Piotr Kolasi=C5=84= ski <[email protected]>: > > Thanks for the response, but I=E2=80=99m afraid that I don=E2=80=99t unde= rstand what you > suggest. Could you be so kind and show me simple example. > Piotr > czwartek, 5 marca 2026 o 15:10:21 UTC+1 M napisa=C5=82(a): > >> >> >> =D0=B2=D1=82, 3 =D0=BC=D0=B0=D1=80. 2026 =D0=B3., 11:41 Piotr Kolasi=C5= =84ski <[email protected]>: >> >>> I try to use popup_menu() in linear code like: >>> >>> =E2=80=94=E2=80=94 >>> >>> func PopupResult(id, sel) >>> let g:popup_sel =3D a:result >>> echo "In popup: " .. g:result >>> endfunc >>> >>> call popup_menu(["A","B","C"], #{ callback: 'PopupResult' }) >>> >>> echo 'After popup' >>> >>> =E2=80=94=E2=80=94- >>> >>> but 'After popup=E2=80=99 is displayed immediately, not waiting for fin= ish the >>> call. >>> Does popup_menu works asynchronous? How can I execute such code in >>> linear way? >>> >>> Piotr >>> >>> -- >>> -- >>> You received this message from the "vim_use" maillist. >>> Do not top-post! Type your reply below the text you are replying to. >>> For more information, visit http://www.vim.org/maillist.php >>> >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "vim_use" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion visit >>> https://groups.google.com/d/msgid/vim_use/78474f86-0bd6-401c-bdc3-fc85b= 4ca7b45n%40googlegroups.com >>> <https://groups.google.com/d/msgid/vim_use/78474f86-0bd6-401c-bdc3-fc85= b4ca7b45n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter> >>> . >>> >> >> Hello, >> >> No you can't. The good news is that you hardly ever need it. Just return >> and continue execution from the callback function. The way typical for >> _modeless_ dialogs. >> >> Regards, >> Matvey >> >>> -- > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_use" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion visit > https://groups.google.com/d/msgid/vim_use/86113ba2-911b-4ce2-ad3d-cecfa9f= 368b2n%40googlegroups.com > <https://groups.google.com/d/msgid/vim_use/86113ba2-911b-4ce2-ad3d-cecfa9= f368b2n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter> > . > Hello, https://github.com/matveyt/vim-drvo/blob/74ad4fe418c68a6a8e6876f73891c6fff8= 31c4e0/autoload/drvo.vim#L90 Regards, Matvey > --=20 --=20 You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php ---=20 You received this message because you are subscribed to the Google Groups "= vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/vim_use/CAF= sTB%2BJi3kYZHDdW6vw9nLBdkqK90z8Xdt-qabFzsimWpiXrMg%40mail.gmail.com. --0000000000000b7809064d265605 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto"><div><br><br><div class=3D"gmail_quote gmail_quote_contai= ner"><div dir=3D"ltr" class=3D"gmail_attr">=D0=BF=D0=BD, 16 =D0=BC=D0=B0=D1= =80. 2026 =D0=B3., 18:54 Piotr Kolasi=C5=84ski <<a href=3D"mailto:ptkola= @gmail.com">[email protected]</a>>:<br></div><blockquote class=3D"gmail_q= uote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1e= x"><br>Thanks for the response, but I=E2=80=99m afraid that I don=E2=80=99t= understand what you suggest. Could you be so kind and show me simple examp= le.<div>Piotr</div><div class=3D"gmail_quote"><div dir=3D"auto" class=3D"gm= ail_attr">czwartek, 5 marca 2026 o=C2=A015:10:21 UTC+1 M napisa=C5=82(a):<b= r></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 0.8ex;borde= r-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"auto"><div>= <br><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">= =D0=B2=D1=82, 3 =D0=BC=D0=B0=D1=80. 2026 =D0=B3., 11:41 Piotr Kolasi=C5=84s= ki <<a rel=3D"nofollow noreferrer">[email protected]</a>>:<br></div><b= lockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px = #ccc solid;padding-left:1ex"></blockquote></div></div></div><div dir=3D"aut= o"><div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style= =3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I try to= use popup_menu() in linear code like:<div><br></div><div>=E2=80=94=E2=80= =94</div><div><br></div><div>func PopupResult(id, sel)</div><div>=C2=A0 =C2= =A0 let g:popup_sel =3D a:result</div><div>=C2=A0 =C2=A0 echo "In popu= p: " .. g:result</div><div>endfunc</div><div><br></div><div>call popup= _menu(["A","B","C"], #{ callback: 'PopupR= esult' })</div><div><br></div><div>echo 'After popup'</div><div= ><br></div><div>=E2=80=94=E2=80=94-</div><div><br></div><div>but 'After= popup=E2=80=99 is displayed immediately, not waiting for finish the call.= =C2=A0</div><div>Does popup_menu works asynchronous? How can I execute such= code in linear way?</div><div><br></div><div>Piotr</div> <p></p></blockquote></div></div></div><div dir=3D"auto"><div><div class=3D"= gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;b= order-left:1px #ccc solid;padding-left:1ex"> -- <br> -- <br> You received this message from the "vim_use" maillist.<br> Do not top-post! Type your reply below the text you are replying to.<br> For more information, visit <a href=3D"http://www.vim.org/maillist.php" rel= =3D"noreferrer nofollow noreferrer" target=3D"_blank">http://www.vim.org/ma= illist.php</a><br> <br> --- <br> You received this message because you are subscribed to the Google Groups &= quot;vim_use" group.<br> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a rel=3D"noreferrer nofollow noreferrer">vim_use+u...@googlegroups= .com</a>.<br> To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/= vim_use/78474f86-0bd6-401c-bdc3-fc85b4ca7b45n%40googlegroups.com?utm_medium= =3Demail&utm_source=3Dfooter" rel=3D"noreferrer nofollow noreferrer" ta= rget=3D"_blank">https://groups.google.com/d/msgid/vim_use/78474f86-0bd6-401= c-bdc3-fc85b4ca7b45n%40googlegroups.com</a>.<br></blockquote></div></div><d= iv dir=3D"auto"><br></div><div dir=3D"auto">Hello,</div><div dir=3D"auto"><= br></div><div dir=3D"auto">No you can't. The good news is that you hard= ly ever need it. Just return and continue execution from the callback funct= ion. The way typical for _modeless_ dialogs.</div><div dir=3D"auto"><br></d= iv><div dir=3D"auto">Regards,</div><div dir=3D"auto">Matvey</div><div dir= =3D"auto"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" styl= e=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> </blockquote></div></div></div> </blockquote></div> <p></p> -- <br> -- <br> You received this message from the "vim_use" maillist.<br> Do not top-post! Type your reply below the text you are replying to.<br> For more information, visit <a href=3D"http://www.vim.org/maillist.php" tar= get=3D"_blank" rel=3D"noreferrer">http://www.vim.org/maillist.php</a><br> <br> --- <br> You received this message because you are subscribed to the Google Groups &= quot;vim_use" group.<br> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:[email protected]" target=3D"_= blank" rel=3D"noreferrer">[email protected]</a>.<br> To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/= vim_use/86113ba2-911b-4ce2-ad3d-cecfa9f368b2n%40googlegroups.com?utm_medium= =3Demail&utm_source=3Dfooter" target=3D"_blank" rel=3D"noreferrer">http= s://groups.google.com/d/msgid/vim_use/86113ba2-911b-4ce2-ad3d-cecfa9f368b2n= %40googlegroups.com</a>.<br></blockquote></div></div><div dir=3D"auto"><br>= </div><div dir=3D"auto">Hello,</div><div dir=3D"auto"><br></div><div dir=3D= "auto"><a href=3D"https://github.com/matveyt/vim-drvo/blob/74ad4fe418c68a6a= 8e6876f73891c6fff831c4e0/autoload/drvo.vim#L90">https://github.com/matveyt/= vim-drvo/blob/74ad4fe418c68a6a8e6876f73891c6fff831c4e0/autoload/drvo.vim#L9= 0</a></div><div dir=3D"auto"><br></div><div dir=3D"auto">Regards,</div><div= dir=3D"auto">Matvey</div><div dir=3D"auto"><div class=3D"gmail_quote gmail= _quote_container"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .= 8ex;border-left:1px #ccc solid;padding-left:1ex"> </blockquote></div></div></div> <p></p> -- <br /> -- <br /> You received this message from the "vim_use" maillist.<br /> Do not top-post! Type your reply below the text you are replying to.<br /> For more information, visit <a href=3D"http://www.vim.org/maillist.php">htt= p://www.vim.org/maillist.php</a><br /> <br /> --- <br /> You received this message because you are subscribed to the Google Groups &= quot;vim_use" group.<br /> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:[email protected]">vim_use+uns= [email protected]</a>.<br /> To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/= vim_use/CAFsTB%2BJi3kYZHDdW6vw9nLBdkqK90z8Xdt-qabFzsimWpiXrMg%40mail.gmail.= com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msg= id/vim_use/CAFsTB%2BJi3kYZHDdW6vw9nLBdkqK90z8Xdt-qabFzsimWpiXrMg%40mail.gma= il.com</a>.<br /> --0000000000000b7809064d265605--