mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #16871 from bfredl/luaperf
perf(api): elide luaref copy when setting 'callback' in nvim_set_keymap
This commit is contained in:
commit
273b5c9282
@ -606,7 +606,8 @@ void modify_keymap(Buffer buffer, bool is_unmap, String mode, String lhs, String
|
||||
}
|
||||
|
||||
if (opts != NULL && opts->callback.type == kObjectTypeLuaRef) {
|
||||
lua_funcref = api_new_luaref(opts->callback.data.luaref);
|
||||
lua_funcref = opts->callback.data.luaref;
|
||||
opts->callback.data.luaref = LUA_NOREF;
|
||||
}
|
||||
MapArguments parsed_args = MAP_ARGUMENTS_INIT;
|
||||
if (opts) {
|
||||
|
Loading…
Reference in New Issue
Block a user