refactor(terminal): impl "[Process exited]" in Lua #38343

Problem:
"[Process exited]" is implemented in C with anonymous namespace
and users have no way to hide it.

Solution:
- Handle "TermClose" event in Lua.
- User can delete the "nvim.terminal" augroup to avoid "[Process exited]".
This commit is contained in:
Ayaan
2026-03-18 17:24:41 +05:30
committed by GitHub
parent 20225fc330
commit 63642ebf80
4 changed files with 65 additions and 34 deletions

View File

@@ -180,6 +180,7 @@ nvim.terminal:
- BufReadCmd: Treats "term://" buffers as |terminal| buffers. |terminal-start|
- TermClose: A |terminal| buffer started with no arguments (which thus uses
'shell') and which exits with no error is closed automatically.
- TermClose: Displays the "[Process exited]" virtual text.
- TermRequest: The terminal emulator responds to OSC background and foreground
requests, indicating (1) a black background and white foreground when Nvim
option 'background' is "dark" or (2) a white background and black foreground