mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 07:16:09 +00:00
feat(api): add lua C bindings for xdiff (#14536)
* feat(api): add lua C bindings for xdiff * chore: opt.hunk_lines -> opt.result_type opt.on_hunk now takes precedence over opt.result_type * chore: fix indents Fix indents * chore: change how priv is managed Assign priv NULL and unconditionally apply XFREE_CLEAR to it when finished.
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
#include "nvim/lua/converter.h"
|
||||
#include "nvim/lua/executor.h"
|
||||
#include "nvim/lua/treesitter.h"
|
||||
#include "nvim/lua/xdiff.h"
|
||||
|
||||
#include "luv/luv.h"
|
||||
|
||||
@@ -517,6 +518,10 @@ static int nlua_state_init(lua_State *const lstate) FUNC_ATTR_NONNULL_ALL
|
||||
// internal vim._treesitter... API
|
||||
nlua_add_treesitter(lstate);
|
||||
|
||||
// vim.diff
|
||||
lua_pushcfunction(lstate, &nlua_xdl_diff);
|
||||
lua_setfield(lstate, -2, "diff");
|
||||
|
||||
lua_setglobal(lstate, "vim");
|
||||
|
||||
{
|
||||
|
Reference in New Issue
Block a user