mirror of
https://github.com/neovim/neovim.git
synced 2026-04-21 06:45:37 +00:00
feat(terminal): surface exit code via virttext + nvim_get_chan_info #37987
Problem: When a terminal process exits, "[Process Exited]" text is added to the buffer contents. Solution: - Return `exitcode` field from `nvim_get_chan_info`. - Show it in the default 'statusline'. - Show exitcode as virtual text in the terminal buffer.
This commit is contained in:
1
runtime/lua/vim/_meta/api.lua
generated
1
runtime/lua/vim/_meta/api.lua
generated
@@ -1309,6 +1309,7 @@ function vim.api.nvim_get_autocmds(opts) end
|
||||
--- - "buffer" (optional) Buffer connected to |terminal| instance.
|
||||
--- - "client" (optional) Info about the peer (client on the other end of the channel), as set
|
||||
--- by |nvim_set_client_info()|.
|
||||
--- - "exitcode" (optional) Exit code of the |terminal| process.
|
||||
---
|
||||
function vim.api.nvim_get_chan_info(chan) end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user