mirror of
https://github.com/neovim/neovim.git
synced 2025-10-01 07:28:34 +00:00
perf(api): elide luaref copy when setting 'callback' in nvim_set_keymap
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user