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:
Tim Pope
2019-05-02 23:43:41 -04:00
parent b27e71c34b
commit 2bde1d9de6

View File

@@ -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