@@ -557,23 +557,26 @@ created for extmark changes.
557557Global Functions *api-global*
558558
559559nvim_chan_send({chan} , {data} ) *nvim_chan_send()*
560- Send data to channel `id` . For a job, it writes it to the stdin of the
561- process. For the stdio channel | channel-stdio | , it writes to Nvim's
562- stdout. For an internal terminal instance (| nvim_open_term() | ) it writes
563- directly to terminal output. See | channel-bytes | for more information.
560+ Sends raw data to channel `chan` . | channel-bytes |
561+ • For a job, it writes it to the stdin of the process.
562+ • For the stdio channel | channel-stdio | , it writes to Nvim's stdout.
563+ • For an internal terminal instance (| nvim_open_term() | ) it writes
564+ directly to terminal output.
564565
565- This function writes raw data, not RPC messages. If the channel was
566- created with `rpc= true` then the channel expects RPC messages, use
567- | vim.rpcnotify() | and | vim.rpcrequest() | instead.
566+ This function writes raw data, not RPC messages. Use | vim.rpcrequest() |
567+ and | vim.rpcnotify() | if the channel expects RPC messages (i.e. it was
568+ created with `rpc= true` ).
569+
570+ To write data to the | TUI | host terminal, see | nvim_ui_send() | .
568571
569572 Attributes: ~
570573 | RPC | only
571574 Lua | vim.api | only
572575 Since: 0.5.0
573576
574577 Parameters: ~
575- • {chan} (`integer` ) id of the channel
576- • {data} (`string ` ) data to write. 8-bit clean: can contain NUL bytes.
578+ • {chan} (`integer` ) Channel id
579+ • {data} (`string ` ) Data to write. 8-bit clean: may contain NUL bytes.
577580
578581nvim_create_buf({listed} , {scratch} ) *nvim_create_buf()*
579582 Creates a new, empty, unnamed buffer.
@@ -3601,11 +3604,13 @@ nvim_ui_pum_set_height({height}) *nvim_ui_pum_set_height()*
36013604nvim_ui_send({content} ) *nvim_ui_send()*
36023605 WARNING: This feature is experimental/unstable.
36033606
3604- Sends arbitrary data to a UI.
3607+ Sends arbitrary data to a UI. Use this instead of | nvim_chan_send() | or
3608+ `io.stdout: write ()` , if you really want to write to the | TUI | host
3609+ terminal.
36053610
3606- This sends a "ui_send" event to any UI that has the "stdout_tty"
3607- | ui-option | set. UIs are expected to write the received data to a
3608- connected TTY if one exists.
3611+ Emits a "ui_send" event to all UIs with the "stdout_tty" | ui-option | set.
3612+ UIs are expected to write the received data to a connected TTY if one
3613+ exists.
36093614
36103615 Parameters: ~
36113616 • {content} (`string ` ) Content to write to the TTY
@@ -3631,10 +3636,10 @@ nvim_ui_set_option({name}, {value}) *nvim_ui_set_option()*
36313636 • {value} (`any` )
36323637
36333638nvim_ui_term_event({event} , {value} ) *nvim_ui_term_event()*
3634- Tells Nvim when a terminal event has occurred
3639+ Tells Nvim when a host- terminal event occurred.
36353640
3636- The following terminal events are supported :
3637- • "termresponse": The terminal sent a DA1, OSC, DCS, or APC response
3641+ Supports these events:
3642+ • "termresponse": The host- terminal sent a DA1, OSC, DCS, or APC response
36383643 sequence to Nvim. The payload is the received response. Sets
36393644 | v:termresponse | and fires | TermResponse | .
36403645
0 commit comments