Fix "List as a String"-error (#193)

This commit is contained in:
Karl Yngve Lervåg 2015-07-07 20:18:08 +02:00
parent 55c4214936
commit a93a88a85a

View File

@ -465,8 +465,12 @@ function! s:labels_parse_number(num_tree) " {{{1
if len(a:num_tree) == 0
return '-'
elseif len(a:num_tree) == 1
let l:num = str2nr(a:num_tree[0])
return l:num > 0 ? l:num : '-'
if type(a:num_tree) == type([])
return s:labels_parse_number(a:num_tree[0])
else
let l:num = str2nr(a:num_tree[0])
return l:num > 0 ? l:num : '-'
endif
else
return s:labels_parse_number(a:num_tree[1])
endif