Cannot :confirm quit/bd/etc a terminal buffer
Describe the bug
Cannot :confirm quit/bd/etc a terminal window
To Reproduce Detailed steps to reproduce the behavior:
vim --clean<cr>
:term<cr>
<c-\><c-n>:confirm quit<cr>
Current behaviour
Save changes to "!/bin/bash"?
When chosen 'yes': E676: No matching autocommands for acwrite buffer
When chosen 'no': Nothing happens
When chosen 'cancel': Nothing happens
Expected behaviour
When chosen 'yes': E382: Cannot write, 'buftype' option is set
When chosen 'no': Same behaviour as :quit!/bd!/etc!
When chosen 'cancel': Nothing happens
Environment (please complete the following information):
- Vim version: 8.2.814
When using :confirm qa, Vim doesn't want to save but Vim wants to kill: Kill job in "!/bin/bash"? Answering 'yes' to that question does work.
Harm te Hennepe wrote:
Describe the bug Cannot
:confirm quit/bd/etca terminal windowTo Reproduce Detailed steps to reproduce the behavior:
vim --clean<cr> :term<cr> <c-\><c-n>:confirm quit<cr>Current behaviour
Save changes to "!/bin/bash"?When chosen 'yes':E676: No matching autocommands for acwrite buffer
I suppose this should not really be an option.
When chosen 'no': Nothing happens
This should probably behave like "quit!".
When chosen 'cancel': Nothing happens
That's OK.
Expected behavior
The question should also be different, there is nothing to save.
When chosen 'yes':
E382: Cannot write, 'buftype' option is set
When chosen 'no': Same behaviour as:quit!/bd!/etc!When chosen 'cancel': Nothing happensEnvironment (please complete the following information):
- Vim version: 8.2.814
-- hundred-and-one symptoms of being an internet addict: 169. You hire a housekeeper for your home page.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \
\\ an exciting new programming language -- http://www.Zimbu.org ///
\\ help me help AIDS victims -- http://ICCF-Holland.org ///
The question should also be different, there is nothing to save.
I think the 'Kill job' question would indeed be better, except for finished jobs.
I suppose the intended way to quit a terminal is Ctrl + D. Though I agree that converting to normal mode -> :confirm q should be able to work too, for consistency.