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?

-- 
Marriage isn't a word.  It's a sentence.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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/202003121842.02CIgudV015899%40masaka.moolenaar.net.

Raspunde prin e-mail lui