From 39e83fa7cb4486d30f788c3b27594d106d5e76ab Mon Sep 17 00:00:00 2001 From: Dongdong Zhou Date: Fri, 24 Feb 2017 06:12:34 +0000 Subject: ui: allow external ui to draw wildmenu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Björn Linse Updated docs and tests. --- runtime/doc/ui.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/ui.txt b/runtime/doc/ui.txt index deac1609c0..5306126e7f 100644 --- a/runtime/doc/ui.txt +++ b/runtime/doc/ui.txt @@ -28,6 +28,7 @@ a dictionary with these (optional) keys: `ext_popupmenu` Externalize the popupmenu. |ui-popupmenu| `ext_tabline` Externalize the tabline. |ui-tabline| `ext_cmdline` Externalize the cmdline. |ui-cmdline| + `ext_wildmenu` Externalize the tabline. |ui-ext-wildmenu| Nvim will then send msgpack-rpc notifications, with the method name "redraw" and a single argument, an array of screen update events. @@ -286,5 +287,23 @@ Only sent if `ext_cmdline` option is set in |ui-options| ["cmdline_block_hide"] Hide the block. +============================================================================== +Wildmenu Events *ui-wildmenu* + +Only sent if `ext_wildmenu` option is set in |ui-options| + +["wildmenu_show", items] + When `ext_wildmenu` is set to true, nvim will not draw the + wildmenu on the grid, instead when the wildmenu is to be displayed + this update is sent. `items` is an array of the completion items. + +["wildmenu_select", selected] + An item in the currently displayed wildmenu is selected. `selected` + is either a zero-based index into the array of items from the last + wildmenu event, or -1 if no item is selected. + +["wildmenu_hide"] + The wildmenu is hidden. + ============================================================================== vim:tw=78:ts=8:noet:ft=help:norl: -- cgit From 59f5eb0065518fffbab6f2ddab2e135f463ac9fc Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Sun, 29 Oct 2017 08:04:42 +0100 Subject: doc: ui.txt --- runtime/doc/ui.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/ui.txt b/runtime/doc/ui.txt index 5306126e7f..4f0006856e 100644 --- a/runtime/doc/ui.txt +++ b/runtime/doc/ui.txt @@ -238,7 +238,7 @@ Only sent if `ext_cmdline` option is set in |ui-options| content: List of [attrs, string] [[{}, "t"], [attrs, "est"], ...] - Triggered when the user types in the cmdline. + Triggered when the cmdline is displayed or changed. The `content` is the full content that should be displayed in the cmdline, and the `pos` is the position of the cursor that in the cmdline. The content is divided into chunks with different highlight @@ -266,7 +266,7 @@ Only sent if `ext_cmdline` option is set in |ui-options| `shift` is true the text after the cursor should be shifted, otherwise it should overwrite the char at the cursor. - Should be hidden at next cmdline_pos. + Should be hidden at next cmdline_show or cmdline_pos. ["cmdline_hide"] Hide the cmdline. @@ -293,9 +293,8 @@ Wildmenu Events *ui-wildmenu* Only sent if `ext_wildmenu` option is set in |ui-options| ["wildmenu_show", items] - When `ext_wildmenu` is set to true, nvim will not draw the - wildmenu on the grid, instead when the wildmenu is to be displayed - this update is sent. `items` is an array of the completion items. + Sent when wildmenu (command line completion) is activated. + `items` is an array with the completion items. ["wildmenu_select", selected] An item in the currently displayed wildmenu is selected. `selected` -- cgit