From f71079db4d83bd0ebd0bc79a357fae2127966045 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 25 Jun 2018 12:51:34 -0400 Subject: [PATCH] Work around guioptions+=! on Windows Closes https://github.com/tpope/vim-fugitive/issues/1042 --- autoload/fugitive.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index ba86ce4..1c4e2d2 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -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!