Skip to content

Commit 2a4e620

Browse files
committed
Don't wait silently on :wall with 'confirm'
1 parent 895c8fa commit 2a4e620

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

autoload/dispatch.vim

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,19 @@ endfunction
267267

268268
function! dispatch#autowrite() abort
269269
if &autowrite || &autowriteall
270-
silent! wall
270+
try
271+
if &confirm
272+
let reconfirm = 1
273+
setglobal noconfirm
274+
endif
275+
silent! wall
276+
finally
277+
if exists('reconfirm')
278+
setglobal confirm
279+
endif
280+
endtry
271281
endif
282+
return ''
272283
endfunction
273284

274285
function! dispatch#status_var() abort

0 commit comments

Comments
 (0)