motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit 38c6acf27af2053bbc63a5d5faa910c2b3550db9 (tree)
parent 70170d825c320e37b1aee785a718171885092d71
Author: Tim Pope <code@tpope.net>
Date:   Sun, 23 Dec 2018 14:30:34 -0500

Disable modelines while loading blob

Modelines will still be evaluated by `doautocmd BufReadPost`.

References https://github.com/tpope/vim-fugitive/issues/1136

Diffstat:
Mautoload/fugitive.vim | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim @@ -1347,13 +1347,16 @@ function! s:ReplaceCmd(cmd, ...) abort let fn = expand('%:p') silent exe 'doau BufReadPre '.s:fnameescape(fn) silent exe 'keepalt file '.temp + let modelines = &modelines try + set modelines=0 if a:0 silent noautocmd edit! else silent edit! endif finally + let &modelines = modelines try silent exe 'keepalt file '.s:fnameescape(fn) catch /^Vim\%((\a\+)\)\=:E302:/