Steps to reproduce:
vim -u NONE
:term
<C-W>:wall<CR>
What happens:
E676: No matching autocommands for acwrite buffer
flashes brieflyWhat I expect
Note that if the terminal is no longer active (e.g you exit the shell), :wall
doesn't complain.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
This also happens to me all the time when I have a terminal open and try to use fzf for opening a buffer.
I think this should be fixed in vim itself although I am uncertain of the implementation details, but in the meantime I use the following workaround in my vimrc:
fun! s:workaroundIssue2190()
" see https://github.com/vim/vim/issues/2190
if &buftype=='terminal' && !exists('b:workaround_issue_2190')
autocmd BufWriteCmd <buffer> echo 'workaround 2190'
let b:workaround_issue_2190=1
endif
endfun
aug workaroundIssue2190
autocmd! BufWinEnter * call s:workaroundIssue2190()
aug END
—
You are receiving this because you commented.
Or add ignoring for write if buftype is nowrite or terminal.
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index b4351b23d..79dc01314 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -3414,6 +3414,12 @@ do_wqall(exarg_T *eap) ++error; break; } + + if (bt_dontwrite(buf)) + { + continue; + } + #ifdef FEAT_BROWSE /* ":browse wall": ask for file name if there isn't one */ if (buf->b_ffname == NULL && cmdmod.browse)
—
You are receiving this because you commented.
+1 for the patch ignoring not-writable buffers.
—
You are receiving this because you commented.