mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 03:48:18 +00:00
refactor(mappings)!: mapblock_fill_dict() use API Dictionary (#20020)
This introduces the following breaking changes: - nvim_get_keymap now always returns a LuaRef object as "callback" for a Lua mapping regardless of how it is called. The LuaRef object can be called from Lua and Vim script, but is lost over RPC. - maparg() now returns a Funcref instead of a ref number as "callback" for a Lua mapping. The Funcref can be called from Lua and Vim script, but is lost over RPC. This may also make nvim_get_keymap faster, but make maparg() slower.
This commit is contained in:
@@ -1421,10 +1421,10 @@ Dictionary nvim_get_mode(void)
|
||||
/// @param mode Mode short-name ("n", "i", "v", ...)
|
||||
/// @returns Array of |maparg()|-like dictionaries describing mappings.
|
||||
/// The "buffer" key is always zero.
|
||||
ArrayOf(Dictionary) nvim_get_keymap(uint64_t channel_id, String mode)
|
||||
ArrayOf(Dictionary) nvim_get_keymap(String mode)
|
||||
FUNC_API_SINCE(3)
|
||||
{
|
||||
return keymap_array(mode, NULL, channel_id == LUA_INTERNAL_CALL);
|
||||
return keymap_array(mode, NULL);
|
||||
}
|
||||
|
||||
/// Sets a global |mapping| for the given mode.
|
||||
|
Reference in New Issue
Block a user