mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 22:03:51 -05:00
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
This commit is contained in:
@@ -1641,6 +1641,7 @@ function! s:ReplaceCmd(cmd) abort
|
|||||||
if exec_error
|
if exec_error
|
||||||
call s:throw((len(err) ? err : filereadable(temp) ? join(readfile(temp), ' ') : 'unknown error running ' . a:cmd))
|
call s:throw((len(err) ? err : filereadable(temp) ? join(readfile(temp), ' ') : 'unknown error running ' . a:cmd))
|
||||||
endif
|
endif
|
||||||
|
setlocal noswapfile
|
||||||
silent exe 'lockmarks keepalt 0read ++edit' s:fnameescape(temp)
|
silent exe 'lockmarks keepalt 0read ++edit' s:fnameescape(temp)
|
||||||
if &foldenable && foldlevel('$') > 0
|
if &foldenable && foldlevel('$') > 0
|
||||||
set nofoldenable
|
set nofoldenable
|
||||||
|
|||||||
Reference in New Issue
Block a user