Fix tab complete for :Git push --option

Closes https://github.com/tpope/vim-fugitive/issues/1570
This commit is contained in:
Tim Pope
2020-07-27 19:57:50 -04:00
parent 1da7c133b1
commit 9b6a24b131

View File

@@ -1622,7 +1622,7 @@ endfunction
function! s:CompleteRemote(A, L, P, ...) abort function! s:CompleteRemote(A, L, P, ...) abort
let dir = a:0 ? a:1 : s:Dir() let dir = a:0 ? a:1 : s:Dir()
let remote = matchstr(a:L, '\u\w*[! ] *\zs\S\+\ze ') let remote = matchstr(a:L, '\u\w*[! ] *.\{-\}\s\@<=\zs[^-[:space:]]\S*\ze ')
if !empty(remote) if !empty(remote)
let matches = s:LinesError([dir, 'ls-remote', remote])[0] let matches = s:LinesError([dir, 'ls-remote', remote])[0]
call filter(matches, 'v:val =~# "\t" && v:val !~# "{"') call filter(matches, 'v:val =~# "\t" && v:val !~# "{"')