diff options
| author | Gregory Anders <greg@gpanders.com> | 2025-04-30 16:34:23 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-30 21:34:23 +0000 |
| commit | 71f3a9c5900fa1882a77f2300baac462a5bf480f (patch) | |
| tree | cea1c74ea574bc9fe6d03463f1addb00dbf12fac /runtime/lua/vim/_meta/api.lua | |
| parent | 6577d72d819dde32abeacd6a72d6ba64483f7ddc (diff) | |
| download | rneovim-71f3a9c5900fa1882a77f2300baac462a5bf480f.tar.gz rneovim-71f3a9c5900fa1882a77f2300baac462a5bf480f.tar.bz2 rneovim-71f3a9c5900fa1882a77f2300baac462a5bf480f.zip | |
feat(terminal): parse current buffer contents in nvim_open_term() (#33720)
When nvim_open_term() is called with a non-empty buffer, the buffer
contents are piped into the PTY.
Diffstat (limited to 'runtime/lua/vim/_meta/api.lua')
| -rw-r--r-- | runtime/lua/vim/_meta/api.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/lua/vim/_meta/api.lua b/runtime/lua/vim/_meta/api.lua index a97b5e2cc5..94c377e629 100644 --- a/runtime/lua/vim/_meta/api.lua +++ b/runtime/lua/vim/_meta/api.lua @@ -1653,7 +1653,7 @@ function vim.api.nvim_notify(msg, log_level, opts) end --- By default (and currently the only option) the terminal will not be --- connected to an external process. Instead, input sent on the channel --- will be echoed directly by the terminal. This is useful to display ---- ANSI terminal sequences returned as part of a rpc message, or similar. +--- ANSI terminal sequences returned as part of an RPC message, or similar. --- --- Note: to directly initiate the terminal using the right size, display the --- buffer in a configured window before calling this. For instance, for a @@ -1675,7 +1675,8 @@ function vim.api.nvim_notify(msg, log_level, opts) end --- end, { desc = 'Highlights ANSI termcodes in curbuf' }) --- ``` --- ---- @param buffer integer the buffer to use (expected to be empty) +--- @param buffer integer Buffer to use. Buffer contents (if any) will be written +--- to the PTY. --- @param opts vim.api.keyset.open_term Optional parameters. --- - on_input: Lua callback for input sent, i e keypresses in terminal --- mode. Note: keypresses are sent raw as they would be to the pty |