completion: only return random theme, when it actually matches

This commit is contained in:
Christian Brabandt 2020-01-30 13:42:21 +01:00
parent e22f735f80
commit f659a98d50
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
1 changed files with 1 additions and 1 deletions

View File

@ -179,7 +179,7 @@ endfunction
function! airline#util#themes(match)
let files = split(globpath(&rtp, 'autoload/airline/themes/'.a:match.'*.vim'), "\n")
return sort(map(files, 'fnamemodify(v:val, ":t:r")') + ['random'])
return sort(map(files, 'fnamemodify(v:val, ":t:r")') + ('random' =~ a:match ? ['random'] : []))
endfunction
function! airline#util#stl_disabled(winnr)