mirror of
https://github.com/neovim/neovim.git
synced 2026-07-12 20:30:35 +00:00
fix(terminal): avoid E676 after failed :wqa (#40620)
This commit is contained in:
@@ -2132,6 +2132,7 @@ void do_wqall(exarg_T *eap)
|
||||
&& channel_job_running((uint64_t)buf->b_p_channel)) {
|
||||
no_write_message_buf(buf);
|
||||
error++;
|
||||
continue;
|
||||
} else if (!bufIsChanged(buf) || bt_dontwrite(buf)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ local testprg = n.testprg
|
||||
local write_file = t.write_file
|
||||
local command = n.command
|
||||
local matches = t.matches
|
||||
local not_matches = t.not_matches
|
||||
local exec_lua = n.exec_lua
|
||||
local sleep = vim.uv.sleep
|
||||
local fn = n.fn
|
||||
@@ -239,6 +240,9 @@ describe(':terminal buffer', function()
|
||||
|
||||
it('requires bang (!) to close a running job #15402', function()
|
||||
eq('Vim(wqall):E948: Job still running (add ! to end the job)', pcall_err(command, 'wqall'))
|
||||
command('redir => g:wqall_out | silent! wqall | redir END')
|
||||
matches('E948:', api.nvim_get_var('wqall_out'))
|
||||
not_matches('E676:', api.nvim_get_var('wqall_out'))
|
||||
for _, cmd in ipairs({ 'bdelete', '%bdelete', 'bwipeout', 'bunload' }) do
|
||||
matches(
|
||||
'^Vim%('
|
||||
|
||||
Reference in New Issue
Block a user