diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index ee4cde6..9ef3357 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -818,13 +818,13 @@ function! s:Commit(args) abort let args = '--cleanup=strip '.args endif if bufname('%') == '' && line('$') == 1 && getline(1) == '' && !&mod - keepalt edit `=msgfile` + execute 'keepalt edit '.s:fnameescape(msgfile) elseif s:buffer().type() ==# 'index' - keepalt edit `=msgfile` + execute 'keepalt edit '.s:fnameescape(msgfile) execute (search('^#','n')+1).'wincmd+' setlocal nopreviewwindow else - keepalt split `=msgfile` + execute 'keepalt split '.s:fnameescape(msgfile) endif let b:fugitive_commit_arguments = args setlocal bufhidden=delete filetype=gitcommit