popup_menu and mouse item select ??

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

popup_menu and mouse item select ??

M Kelly

When using popup_menu / popup_create, is it possible to use the mouse to select an item ?
My filter has:
    if a:key == 'q' || a:key == 'x' || a:key == '\<Esc>' || a:key == '\<C-c>'
        call popup_close(a:id, 0)
        return 1
    elseif a:key == "\<LeftMouse>"
But I never receive the mouse key event/selection.  I can close the menu on the 'X' with a click.
I was figuring if I received a mouse 'key' then I could get the geom and calclate which item was chosen ?
Is this even possible ?

thx for any help, as always, to everyone in the vim community,

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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/a5d4d9b6-b6c9-4f7d-94c8-a4b007346e19%40googlegroups.com.