Merge pull request #455 from taketwo/fix-empty-key-error

Fix "Cannot use empty key for Dictionary" error
This commit is contained in:
Bailey Ling 2014-03-10 08:15:17 -04:00
commit 799e5e028f
1 changed files with 1 additions and 0 deletions

View File

@ -19,6 +19,7 @@ function! airline#extensions#tabline#unique_tail_improved#format(bufnr, buffers)
let tokens = reverse(split(substitute(fnamemodify(name, ':p:.:h'), '\\', '/', 'g'), '/'))
let token_index = 0
for token in tokens
if token == '' | continue | endif
if token == '.' | break | endif
if !has_key(path_tokens, token_index)
let path_tokens[token_index] = {}