diff --git a/autoload/vimtex/complete.vim b/autoload/vimtex/complete.vim index 7690efc..381e75b 100644 --- a/autoload/vimtex/complete.vim +++ b/autoload/vimtex/complete.vim @@ -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