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
Today after updating my neovim build to the latest nightly (neovim/neovim@6d52a29), I started seeing errors originating from the set_editor_opts function executed by the LightspeedLeave autocommand.
Error detected while processing User Autocommands for "LightspeedLeave":
Error executing lua callback: ...ite/pack/packer/start/lightspeed.nvim/lua/lightspeed.lua:2764: E487: Argument must be positive
stack traceback:
[C]: in function '__newindex'
...ite/pack/packer/start/lightspeed.nvim/lua/lightspeed.lua:2764: in function <...ite/pack/packer/start/lightspeed.nvim/lua/lightsp
eed.lua:2757>
[C]: in function 'exec_user_autocmds'
...ite/pack/packer/start/lightspeed.nvim/lua/lightspeed.lua:2047: in function '_396_'
...ite/pack/packer/start/lightspeed.nvim/lua/lightspeed.lua:2050: in function 'get_first_input'
...ite/pack/packer/start/lightspeed.nvim/lua/lightspeed.lua:2369: in function 'go'
...m/site/pack/packer/start/lightspeed.nvim/plugin/init.lua:3: in function <...m/site/pack/packer/start/lightspeed.nvim/plugin/init
.lua:3>
Thanks for the thorough report! I had no mental energy to further investigate and really grok what causes this issue, but it seems we don't need that offending part in the code anymore (neovim/neovim#13964), so I just inserted a conditional check as a temporary fix.
Hey! Thanks for this great plugin!
Today after updating my neovim build to the latest nightly (neovim/neovim@6d52a29), I started seeing errors originating from the
set_editor_opts
function executed by theLightspeedLeave
autocommand.The line that fails is
lightspeed.nvim/lua/lightspeed.lua
Line 2762 in 8fb5ebb
Investigation
I added a
print
to see which option cannot be set.It turns out, this code tries to set
vim.wo.scrolloff = -1
, which fails with that error.I checked the results of the following neovim commands:
I believe the result of
&l:scrolloff
may be a problem. After all, this is the value that is requested inlightspeed.nvim/lua/lightspeed.lua
Lines 2741 to 2742 in 8fb5ebb
Possibly related to neovim/neovim#18743
Possible solution
If
&l:scrolloff
is-1
, then looks likesetlocal scrolloff
is not set, so there is no need to restore it, unless I am mistaken.The text was updated successfully, but these errors were encountered: