fix(examples): unset `fooModeExit` before first run

pull/20/head
Iron-E 1 year ago
parent 8c164b811d
commit 5c4685cab2
No known key found for this signature in database
GPG Key ID: 83A6AEB40395D40D

@ -17,4 +17,5 @@ function FooMode()
end
-- enter the prompt
vim.g.fooModeExit = false
libmodal.prompt.enter('FOO', FooMode, commandList)

@ -10,4 +10,5 @@ local commands =
}
-- begin the prompt
vim.g.fooModeExit = false
libmodal.prompt.enter('FOO', commands)

@ -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)

Loading…
Cancel
Save