diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 0178a7c..14a95d6 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2258,6 +2258,10 @@ function! fugitive#FileWriteCmd(...) abort if commit !~# '^[0-3]$' || !v:cmdbang && (line("'[") != 1 || line("']") != line('$')) return "noautocmd '[,']write" . (v:cmdbang ? '!' : '') . ' ' . s:fnameescape(amatch) endif + if exists('+guioptions') && &guioptions =~# '!' + let guioptions = &guioptions + set guioptions-=! + endif silent execute "'[,']write !".fugitive#Prepare(dir, 'hash-object', '-w', '--stdin', '--').' > '.tmp let sha1 = readfile(tmp)[0] let old_mode = matchstr(s:SystemError([dir, 'ls-files', '--stage', '.' . file])[0], '^\d\+') @@ -2275,6 +2279,9 @@ function! fugitive#FileWriteCmd(...) abort return 'echoerr '.string('fugitive: '.error) endif finally + if exists('guioptions') + let &guioptions = guioptions + endif call delete(tmp) endtry endfunction