vim icon indicating copy to clipboard operation
vim copied to clipboard

Cannot :confirm quit/bd/etc a terminal buffer

Open HarmtH opened this issue 5 years ago • 4 comments

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

HarmtH avatar May 23 '20 22:05 HarmtH

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.

HarmtH avatar May 23 '20 22:05 HarmtH

Harm te Hennepe wrote:

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

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 happens

Environment (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 ///

brammool avatar May 24 '20 15:05 brammool

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.

HarmtH avatar May 24 '20 15:05 HarmtH

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.

birdue avatar Feb 06 '24 12:02 birdue