aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-01-27 00:21:22 +0100
committerJustin M. Keyes <justinkz@gmail.com>2019-01-27 00:51:58 +0100
commit1a3d2dbfe7aadef46b26eac125949a3e1b100194 (patch)
tree7909cdf506ffab93463a23f6d45a74990d464f70 /runtime
parentd760e08facda964c04c08d589135cd6b53e16196 (diff)
downloadrneovim-1a3d2dbfe7aadef46b26eac125949a3e1b100194.tar.gz
rneovim-1a3d2dbfe7aadef46b26eac125949a3e1b100194.tar.bz2
rneovim-1a3d2dbfe7aadef46b26eac125949a3e1b100194.zip
menu_get(): fix query behavior
- Return the menu properties, not only its children. - If the {path} param is given, return only the first node. The "next" nodes in the linked-list are irrelevant.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt17
1 files changed, 9 insertions, 8 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 425dcede8b..5dc282f6ba 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -5666,23 +5666,24 @@ max({expr}) Return the maximum value of all items in {expr}.
menu_get({path}, {modes}) *menu_get()*
Returns a |List| of |Dictionaries| describing |menus| (defined
- by |:menu|, |:amenu|, etc.).
- {path} limits the result to a subtree of the menu hierarchy
- (empty string matches all menus). E.g. to get items in the
- "File" menu subtree: >
+ by |:menu|, |:amenu|, …), including |hidden-menus|.
+
+ {path} matches a menu by name, or all menus if {path} is an
+ empty string. Example: >
:echo menu_get('File','')
+ :echo menu_get('')
<
{modes} is a string of zero or more modes (see |maparg()| or
|creating-menus| for the list of modes). "a" means "all".
- For example: >
+ Example: >
nnoremenu &Test.Test inormal
inoremenu Test.Test insert
vnoremenu Test.Test x
echo menu_get("")
-<
- returns something like this:
->
+
+< returns something like this: >
+
[ {
"hidden": 0,
"name": "Test",