diff --git a/examples/lua/prompt-callback.lua b/examples/lua/prompt-callback.lua index adee686..e181f7e 100644 --- a/examples/lua/prompt-callback.lua +++ b/examples/lua/prompt-callback.lua @@ -17,4 +17,5 @@ function FooMode() end -- enter the prompt +vim.g.fooModeExit = false libmodal.prompt.enter('FOO', FooMode, commandList) diff --git a/examples/lua/prompt-commands.lua b/examples/lua/prompt-commands.lua index 32f2cfa..461c009 100644 --- a/examples/lua/prompt-commands.lua +++ b/examples/lua/prompt-commands.lua @@ -10,4 +10,5 @@ local commands = } -- begin the prompt +vim.g.fooModeExit = false libmodal.prompt.enter('FOO', commands) diff --git a/examples/prompt-callback.vim b/examples/prompt-callback.vim index bf510d1..66a5375 100644 --- a/examples/prompt-callback.vim +++ b/examples/prompt-callback.vim @@ -14,5 +14,6 @@ function! s:fooMode() abort endif endfunction +let g:fooModeExit = v:false " You have to convert s:commandList from a Vimscript list to a lua table using luaeval(). call luaeval("require('libmodal').prompt.enter('FOO', 's:fooMode', _A)", s:commandList)