Home Explore Blog CI



neovim

12th chunk of `runtime/doc/ui.txt`
cca9e20cc1cae50f43d8e34154f196116a5b0a614fa571790000000100000a8b
 (ex command) and `/` `?` (search),
	while `prompt` is an |input()| prompt, highlighted with `hl_id`.
	`indent` tells how many spaces the content should be indented.

	The Nvim command line can be invoked recursively, for instance by
	typing `<c-r>=` at the command line prompt. The `level` field is used
	to distinguish different command lines active at the same time. The
	first invoked command line has level 1, the next recursively-invoked
	prompt has level 2. A command line invoked from the |cmdline-window|
	has a higher level than the edited command line.

["cmdline_pos", pos, level] ~
	Change the cursor position in the cmdline.

["cmdline_special_char", c, shift, level] ~
	Display a special char in the cmdline at the cursor position. This is
	typically used to indicate a pending state, e.g. after |c_CTRL-V|. If
	`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_show.

["cmdline_hide", level, abort] ~
	Hide the cmdline. `level` is the nesting level of the cmdline being hidden.
	`abort` is true if the cmdline is hidden after an aborting condition
	(|c_Esc| or |c_CTRL-C|).

["cmdline_block_show", lines] ~
	Show a block of context to the current command line. For example if
	the user defines a |:function| interactively: >vim
	    :function Foo()
	    :  echo "foo"
	    :
<
	`lines` is a list of lines of highlighted chunks, in the same form as
	the "cmdline_show" `contents` parameter.

["cmdline_block_append", line] ~
	Append a line at the end of the currently shown block.

["cmdline_block_hide"] ~
	Hide the block.

==============================================================================
Message/Dialog Events					   *ui-messages*

Activated by the `ext_messages` |ui-option|.
Activates |ui-linegrid| and |ui-cmdline| implicitly.

This UI extension delegates presentation of messages and dialogs. Messages
that would otherwise render in the message/cmdline screen space, are emitted
as UI events.

Nvim will not allocate screen space for the cmdline or messages. 'cmdheight'
will be set to zero, but can be changed and used for the replacing cmdline or
message window. Cmdline state is emitted as |ui-cmdline| events, which the UI
must handle.

["msg_show", kind, content, replace_last, history, append] ~
	Display a message to the user.

	kind
	    Name indicating the message kind:
		"" (empty)	Unknown (consider a |feature-request|)
		"bufwrite"	|:write| message
		"confirm"	Message preceding a prompt (|:confirm|,
				|confirm()|, |inputlist()|, |z=|, …)
		"emsg"		Error (|errors|, internal error, |:throw|, …)
		"echo"		|:echo| message
		"echomsg"	|:echomsg|

Title: Cmdline and Message/Dialog Events
Summary
Continuing the description of Cmdline events, the chunk details `cmdline_hide`, which hides the command line at a specific nesting level and indicates whether it was aborted, as well as `cmdline_block_show`, which shows a block of context to the current command line, `cmdline_block_append`, which adds a line to the end of the current block, and `cmdline_block_hide`, which hides the block. The chunk then transitions to Message/Dialog events, which are activated by the `ext_messages` option and implicitly activate `ui-linegrid` and `ui-cmdline`. Describes `msg_show`, used to display a message to the user, along with the meaning of the `kind` field.