mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-16 15:23:51 -05:00
Try nested autocmds for ReadCmd/WriteCmd
I'm trying to leverage OptionSet for something. Let's see if this causes issues for anybody.
This commit is contained in:
@@ -2497,7 +2497,7 @@ function! s:ReplaceCmd(cmd) abort
|
||||
throw 'fugitive: ' . (len(err) ? substitute(err, "\n$", '', '') : 'unknown error running ' . string(a:cmd))
|
||||
endif
|
||||
setlocal noswapfile
|
||||
silent exe 'lockmarks keepalt 0read ++edit' s:fnameescape(temp)
|
||||
silent exe 'lockmarks keepalt noautocmd 0read ++edit' s:fnameescape(temp)
|
||||
if &foldenable && foldlevel('$') > 0
|
||||
set nofoldenable
|
||||
silent keepjumps $delete _
|
||||
@@ -2507,7 +2507,7 @@ function! s:ReplaceCmd(cmd) abort
|
||||
endif
|
||||
call delete(temp)
|
||||
if s:cpath(fnamemodify(bufname('$'), ':p'), temp)
|
||||
silent! execute bufnr('$') . 'bwipeout'
|
||||
silent! noautocmd execute bufnr('$') . 'bwipeout'
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user