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

@@ -215,7 +215,7 @@ local function test_terminal_with_fake_shell(backslash)
command('terminal')
screen:expect([[
^ready $ |
[Process exited 0] |
|
|*2
]])
end)
@@ -297,7 +297,7 @@ local function test_terminal_with_fake_shell(backslash)
command('terminal')
screen:expect([[
^ready $ |
[Process exited 0] |
|
|*2
]])
eq('term://', string.match(eval('bufname("%")'), '^term://'))