commit 89e6b5e4e1d8152bfc3c26aa2655c0342d0809d1 (tree)
parent 4189bdb580743a92f0e81d0ba9359a1c3b253a3c
Author: Tim Pope <code@tpope.net>
Date: Sun, 11 Oct 2020 20:42:35 -0400
Disable 'swapfile' early
This should eliminate the need to disable 'swapfile' in
fugitive#BufReadCmd(), but I'm inclined not to fix what isn't broken.
Closes https://github.com/tpope/vim-fugitive/issues/1598
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim
@@ -1641,6 +1641,7 @@ function! s:ReplaceCmd(cmd) abort
if exec_error
call s:throw((len(err) ? err : filereadable(temp) ? join(readfile(temp), ' ') : 'unknown error running ' . a:cmd))
endif
+ setlocal noswapfile
silent exe 'lockmarks keepalt 0read ++edit' s:fnameescape(temp)
if &foldenable && foldlevel('$') > 0
set nofoldenable