Skip to content

Commit

Permalink
Guard against null returns
Browse files Browse the repository at this point in the history
If z hasn't been configured, don't die while trying to autocomplete.
  • Loading branch information
PsychoLlama committed Jun 24, 2018
1 parent 8bd5bd3 commit d01b982
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions autoload/zcd.vim
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ func! zcd#Completion(args, command, cursor) abort
endif

let l:matches = zcd#FindMatches(l:search)
let l:matches = type(l:matches) == v:t_list ? l:matches : []
call map(l:matches, 'v:val.directory')

return l:matches
Expand Down

0 comments on commit d01b982

Please sign in to comment.