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 66697b99d6519da277819fad0e99ffae1aca6a86 (tree)
parent fb5531997342be62efbbb98bda4b90ee88b2ac00
Author: Tim Pope <code@tpope.net>
Date:   Wed, 19 Sep 2018 17:17:17 -0400

Don't throw error on invalid URL to FugitiveParse()

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

diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim @@ -57,6 +57,9 @@ endfunction function! FugitiveParse(...) abort let path = s:Slash(a:0 ? a:1 : @%) + if path !~# '^fugitive:' + return ['', ''] + endif let vals = matchlist(path, '\c^fugitive:\%(//\)\=\(.\{-\}\)\%(//\|::\)\(\x\{40\}\|[0-3]\)\(/.*\)\=$') if len(vals) return [(vals[2] =~# '^.$' ? ':' : '') . vals[2] . substitute(vals[3], '^/', ':', ''), vals[1]]