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