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.
This commit is contained in:
Tim Pope
2021-08-21 14:11:08 -04:00
parent b4aad6dc43
commit 6aaa229db8

View File

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