You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since f78a0bd, vimtex throws the following error when vim starts and 'g:tex_flavor' is not set:
Error detected while processing /home/username/.vim/plugged/vimtex/plugin/vimtex.vim[12]..function vimtex#log#warning[1]..10[13]..vimtex#debug#stacktrace:
line 44:
E684: list index out of range: 1
E116: Invalid arguments for function matchstr( vimtex#util#command('verbose function ' . l:func_name)[1], v:lang[0:1] ==# 'en' ? 'Last set from \zs.*\.vim' : '\f\+\.vim')
The problem arises when vimtex#log#warning is called in plugin/vimtex.vim. Eventually a manual stacktrace is created, but the top-level item in v:throwpoint is just the filename /home/username/.vim/plugged/vimtex/plugin/vimtex.vim, which is not properly handled by the logic in vimtex#debug#stacktrace: The call to vimtex#util#command on line 52 in autoload/vimtex/debug.vim returns an empty list, and the error is thrown when trying to access its second element.
To reproduce, just run vim -u minimal.vim. No tex file or server needed.
Huh, I'm sorry to say that I can't reproduce this (tried with Vim and neovim). Still, I've tried to fix the line where the error originated. Can you test?
Issue
Since f78a0bd, vimtex throws the following error when vim starts and 'g:tex_flavor' is not set:
The problem arises when
vimtex#log#warning
is called inplugin/vimtex.vim
. Eventually a manual stacktrace is created, but the top-level item inv:throwpoint
is just the filename/home/username/.vim/plugged/vimtex/plugin/vimtex.vim
, which is not properly handled by the logic invimtex#debug#stacktrace
: The call tovimtex#util#command
on line 52 inautoload/vimtex/debug.vim
returns an empty list, and the error is thrown when trying to access its second element.To reproduce, just run
vim -u minimal.vim
. No tex file or server needed.minimal.vim
Output from VimtexInfo
The text was updated successfully, but these errors were encountered: