From bffaf1e27e49c3dbbc0b59d023a0fd9243e254aa Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 20 Aug 2022 15:52:35 +0800 Subject: fix(eval): check for v:lua when calling callback (#19855) This makes callback_call() match call_vim_function() when calling a function. --- test/functional/lua/luaeval_spec.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test/functional/lua/luaeval_spec.lua') diff --git a/test/functional/lua/luaeval_spec.lua b/test/functional/lua/luaeval_spec.lua index 1322155595..9f313eab9e 100644 --- a/test/functional/lua/luaeval_spec.lua +++ b/test/functional/lua/luaeval_spec.lua @@ -467,7 +467,6 @@ describe('v:lua', function() end end end - vim.api.nvim_buf_set_option(0, 'omnifunc', 'v:lua.mymod.omni') ]]) end) @@ -515,6 +514,7 @@ describe('v:lua', function() [5] = {bold = true, foreground = Screen.colors.SeaGreen4}, }) screen:attach() + meths.buf_set_option(0, 'omnifunc', 'v:lua.mymod.omni') feed('isome st') screen:expect{grid=[[ some stuff^ | @@ -526,6 +526,9 @@ describe('v:lua', function() {1:~ }| {4:-- Omni completion (^O^N^P) }{5:match 1 of 3} | ]]} + meths.set_option('operatorfunc', 'v:lua.mymod.noisy') + feed('g@g@') + eq("hey line", meths.get_current_line()) end) it('supports packages', function() -- cgit