mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-08 11:33:47 -05:00
Don't activate autocmds with tmp filenames
This was done in d4fb2a2f5c to fix
filetype modelines, but it appears to no longer be necessary and is
confusing other plugins.
This commit is contained in:
@@ -1318,7 +1318,7 @@ endfunction
|
|||||||
|
|
||||||
" Section: Buffer auto-commands
|
" Section: Buffer auto-commands
|
||||||
|
|
||||||
function! s:ReplaceCmd(cmd, ...) abort
|
function! s:ReplaceCmd(cmd) abort
|
||||||
let temp = tempname()
|
let temp = tempname()
|
||||||
let err = s:TempCmd(temp, a:cmd)
|
let err = s:TempCmd(temp, a:cmd)
|
||||||
if v:shell_error
|
if v:shell_error
|
||||||
@@ -1330,11 +1330,7 @@ function! s:ReplaceCmd(cmd, ...) abort
|
|||||||
let modelines = &modelines
|
let modelines = &modelines
|
||||||
try
|
try
|
||||||
set modelines=0
|
set modelines=0
|
||||||
if a:0
|
silent keepjumps noautocmd edit!
|
||||||
silent keepjumps noautocmd edit!
|
|
||||||
else
|
|
||||||
silent keepjumps edit!
|
|
||||||
endif
|
|
||||||
finally
|
finally
|
||||||
let &modelines = modelines
|
let &modelines = modelines
|
||||||
try
|
try
|
||||||
|
|||||||
Reference in New Issue
Block a user