Work around guioptions+=! on Windows

Closes https://github.com/tpope/vim-fugitive/issues/1042
This commit is contained in:
Tim Pope 2018-06-25 12:51:34 -04:00
parent cbf96cc01a
commit f71079db4d

View File

@ -1009,7 +1009,11 @@ function! s:Commit(mods, args, ...) abort
let outfile = tempname() let outfile = tempname()
let errorfile = tempname() let errorfile = tempname()
try try
let guioptions = &guioptions
try try
if &guioptions =~# '!'
setglobal guioptions-=!
endif
execute cd s:fnameescape(repo.tree()) execute cd s:fnameescape(repo.tree())
if s:winshell() if s:winshell()
let command = '' let command = ''
@ -1029,6 +1033,7 @@ function! s:Commit(mods, args, ...) abort
let error = v:shell_error let error = v:shell_error
finally finally
execute cd s:fnameescape(dir) execute cd s:fnameescape(dir)
let &guioptions = guioptions
endtry endtry
if !has('gui_running') if !has('gui_running')
redraw! redraw!