From 6aaa229db8101feedcb11f6fe2245b2aca4b719b Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sat, 21 Aug 2021 14:11:08 -0400 Subject: [PATCH] Fix inclusion of trailing quote when parsing config file This has no effect on the current behavior because we're only checking for the presence of the URL, not actually using it. Still, this will prevent a bug from creeping in if rhubarb#HomepageForUrl() ever gets more strict. --- plugin/rhubarb.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/rhubarb.vim b/plugin/rhubarb.vim index 1359bc2..8d82f02 100644 --- a/plugin/rhubarb.vim +++ b/plugin/rhubarb.vim @@ -24,7 +24,7 @@ function! s:SetUpMessage(filename) abort let config_file = FugitiveFind('.git/config', dir) let config = filereadable(config_file) ? readfile(config_file) : [] if !empty(filter(config, - \ '!empty(rhubarb#HomepageForUrl(matchstr(v:val, ''^\s*url\s*=\s*"\=\zs\S*'')))')) + \ '!empty(rhubarb#HomepageForUrl(matchstr(v:val, ''^\s*url\s*=\s*"\=\zs[^[:space:]"]*'')))')) setlocal omnifunc=rhubarb#Complete endif endfunction