mirror of
https://github.com/neovim/neovim.git
synced 2026-02-20 09:19:43 +10:00
vim-patch:9.1.2095: :wqall! doesn't quit when using :quit in BufWritePost
Problem: :wqall! doesn't quit when using :quit in BufWritePost
(after 8.0.1190).
Solution: Restore old value of "exiting" when calling not_exiting()
instead of always resetting it to FALSE (zeertzjq).
related: vim/vim#2205
closes: vim/vim#19212
e803ad1c56
This commit is contained in:
@@ -93,6 +93,20 @@ func Test_exiting()
|
||||
call assert_equal(['QuitPre', 'ExitPre'], readfile('Xtestout'))
|
||||
endif
|
||||
call delete('Xtestout')
|
||||
|
||||
" Test using :quit in BufWritePost during :wqall
|
||||
let after =<< trim [CODE]
|
||||
botright new Xwritebuf
|
||||
call setline(1, 'SHOULD BE WRITTEN')
|
||||
autocmd BufWritePost Xwritebuf 1quit
|
||||
wqall
|
||||
call setline(1, 'NOT REACHED') | write | qall
|
||||
[CODE]
|
||||
|
||||
if RunVim([], after, '')
|
||||
call assert_equal(['SHOULD BE WRITTEN'], readfile('Xwritebuf'))
|
||||
endif
|
||||
call delete('Xwritebuf')
|
||||
endfunc
|
||||
|
||||
" Test for getting the Vim exit code from v:exiting
|
||||
|
||||
Reference in New Issue
Block a user