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 bb89a7a4971967c70c039110f50452a48aaa693d (tree)
parent a67e1f8189938c44f295fc97e6c9dd13b727b1e3
Author: Tim Pope <code@tpope.net>
Date:   Sun, 19 Sep 2021 07:52:53 -0400

Invert flag for lazy initialization

I think this second argument might become an optional buffer number at
some point, so change the special value for lazy to an invalid buffer
number.

Diffstat:
Mplugin/fugitive.vim | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim @@ -420,7 +420,7 @@ function! FugitiveDetect(...) abort if exists('b:git_dir') && b:git_dir =~# '^$\|' . s:bad_git_dir unlet b:git_dir endif - if a:0 > 1 && a:2 && !exists('#User#Fugitive') + if a:0 > 1 && a:2 is# 0 && !exists('#User#Fugitive') return '' endif if !exists('b:git_dir') @@ -604,7 +604,7 @@ augroup fugitive autocmd! autocmd BufNewFile,BufReadPost * - \ call FugitiveDetect(expand('<amatch>:p'), 1) + \ call FugitiveDetect(expand('<amatch>:p'), 0) autocmd FileType netrw call FugitiveDetect(fnamemodify(get(b:, 'netrw_curdir', expand('<afile>:p')), ':p'), 1) autocmd FileType git