aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/executor.c
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2021-08-22 11:22:04 +0100
committerGitHub <noreply@github.com>2021-08-22 12:22:04 +0200
commit3d3c0c669d054ef49304223e3b91ac820996d1e0 (patch)
tree693bbe97a3b04465ae887ca10f01cae3cedf5cc2 /src/nvim/lua/executor.c
parent8331cd13c45fb75bff0cec328ccba79b3ae61fa5 (diff)
downloadrneovim-3d3c0c669d054ef49304223e3b91ac820996d1e0.tar.gz
rneovim-3d3c0c669d054ef49304223e3b91ac820996d1e0.tar.bz2
rneovim-3d3c0c669d054ef49304223e3b91ac820996d1e0.zip
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.
Diffstat (limited to 'src/nvim/lua/executor.c')
-rw-r--r--src/nvim/lua/executor.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c
index 5799c3ee98..7fa7a7d94e 100644
--- a/src/nvim/lua/executor.c
+++ b/src/nvim/lua/executor.c
@@ -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");
{