Hi Bram,
On Thu, Mar 12, 2020 at 11:43 AM Bram Moolenaar <[email protected]> wrote:
>
> Yegappan wrote:
>
> > > > When trying to develop tests for the menu functionality, I realized
> > > > that there is no function to get information about the menu items.
> > > > As part of PR #5760, I have added a new menu_getprop() function
> > > > that returns information about the specified menu item(s).
> > > > The help text for this new function is below. Let me know if you have
> > > > any comments/suggestions.
> > >
> > > Menus are very much like mappings. Can we make this work more or less
> > > like maparg() with the {dict} argument TRUE?
> > >
> > >
> > One difference compared to the maps is that a given menu can have
> > submenus. So we need to return information about the submenus also.
> > Otherwise it will be difficult to iterate over all the submenus of a
> given
> > menu item.
>
> Sure, it won't be exactly the same.
>
> I think we always identify menus by their name, or path of names. Thus
> the submenus could be returned as a list of names. You could then get
> more info by using the function on the root name plus the submenu name.
> That would need to be supported anyway. Does that sound right?
>
Yes. I have updated the PR to add the menu_info() function which is modeled
after the maparg() function incorporating your comments.
Regards,
Yegappan
--
--
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/CAAW7x7mSYByvs8vgo2nz0AGWP-rEyGiFPdXr_Kv9wak94a%3DvMw%40mail.gmail.com.