diff options
author | glacambre <code@lacamb.re> | 2023-02-11 13:51:33 +0100 |
---|---|---|
committer | glacambre <code@lacamb.re> | 2023-02-11 14:02:17 +0100 |
commit | 5ca6cf55f9c772f5c691b08dc49581f27f88e8f9 (patch) | |
tree | 15f7b4bc8466d7427b35276c10cd080bd52e7f49 /runtime/lua/vim/_editor.lua | |
parent | c9b0fe1f41ebaa6815a69ac614a5b2d1bab6f720 (diff) | |
download | rneovim-5ca6cf55f9c772f5c691b08dc49581f27f88e8f9.tar.gz rneovim-5ca6cf55f9c772f5c691b08dc49581f27f88e8f9.tar.bz2 rneovim-5ca6cf55f9c772f5c691b08dc49581f27f88e8f9.zip |
fix(helpers): restore channel id after a call to WITH_SCRIPT_CONTEXT
In https://github.com/neovim/neovim/pull/22214, init_default_autocmds
has been turned into a lua function call to nvim_create_augroup and
nvim_create_autocmd.
This introduced a strange regression: a test in vim_spec.lua started
failing with its last_set_chan value switching from 0 to
-9223372036854775808.
It turns out that -9223372036854775808 is the value of LUA_INTERNAL_CALL
and would be inherited as last_set_chan by options set from the command
line due to the WITH_SCRIPT_CONTEXT macro not restoring the channel id
(WITH_SCRIPT_CONTEXT is used by nvim_create_augroup).
Diffstat (limited to 'runtime/lua/vim/_editor.lua')
0 files changed, 0 insertions, 0 deletions