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
sample error text (slightly edited for readability):
Error detected while processing modelines[2075]
..OptionSet Autocommands for "tabstop"
..function indent_guides#process_autocmds[2]
..indent_guides#enable[8]
..indent_guides#init_script_vars[7]
..indent_guides#capture_highlight:
line 1:
E12: Command not allowed from exrc/vimrc in current dir or tag search
E12: Command not allowed from exrc/vimrc in current dir or tag search
E12: Command not allowed from exrc/vimrc in current dir or tag search
steps to reproduce (approx).:
start nvim with this plugin and modeline enabled
open a file containing modeline (by :e command)
looks like when this plugin is triggered from OptionSet event via modeline, it is run inside sandbox where indent_guides#capture_highlight() function errors out because execute() function is not allowed inside sandbox.
one possible solution is to use some function like synIDattr() and related functions (synIDtrans(), hlID()) to directly query any needed highlight color values instead of execute()ing and parsing :highlight output.
those functions exists in regular vim for quite some time and appears to be sandbox safe, so it should be safe to use.
The text was updated successfully, but these errors were encountered:
Boolean263
added a commit
to Boolean263/vim-indent-guides
that referenced
this issue
Jun 14, 2023
I get a similar error when I open help in neovim 0.10.0:
Error detected while processing modelines[272]..OptionSet Autocommands for "tabstop"..function indent_guides#process_autoc
mds[2]..indent_guides#enable[8]..indent_guides#init_script_vars[7]..indent_guides#capture_highlight:
line 1:
E12: Command not allowed in secure mode in current dir or tag search
E12: Command not allowed in secure mode in current dir or tag search
sample error text (slightly edited for readability):
steps to reproduce (approx).:
:e
command)looks like when this plugin is triggered from OptionSet event via modeline, it is run inside sandbox where
indent_guides#capture_highlight()
function errors out becauseexecute()
function is not allowed inside sandbox.vim-indent-guides/autoload/indent_guides.vim
Lines 255 to 259 in 9a106c7
one possible solution is to use some function like
synIDattr()
and related functions (synIDtrans()
,hlID()
) to directly query any needed highlight color values instead ofexecute()
ing and parsing:highlight
output.those functions exists in regular vim for quite some time and appears to be sandbox safe, so it should be safe to use.
The text was updated successfully, but these errors were encountered: