From 3b85822b91bc9b7f78c997db609fd78369d573ed Mon Sep 17 00:00:00 2001 From: Iron-E Date: Sat, 19 Dec 2020 18:27:35 -0500 Subject: [PATCH] docs(help): prompt.enter {supressExit} parameter --- doc/libmodal-lua.txt | 2 +- doc/libmodal.txt | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/doc/libmodal-lua.txt b/doc/libmodal-lua.txt index ee54373..df035aa 100644 --- a/doc/libmodal-lua.txt +++ b/doc/libmodal-lua.txt @@ -1140,7 +1140,7 @@ FUNCTIONS *libmodal-lua-Prompt-functions* < *libmodal-lua-Prompt.new()* -`Prompt`.new({name}, {instruction} [, {completions}]) +`Prompt`.new({name}, {instruction} [, {completions}, {supressExit}]) User input is taken using |input()|. It is passed through a |g:var| determined by the {name} of the mode. For example, if {name} is "FOO" diff --git a/doc/libmodal.txt b/doc/libmodal.txt index f2d5a0a..7301423 100644 --- a/doc/libmodal.txt +++ b/doc/libmodal.txt @@ -236,8 +236,8 @@ FUNCTIONS *libmodal-usage-function |nvim_set_keymap()| For more information about {keymap}. *libmodal-prompt* *libmodal#Prompt()* *libmodal.prompt.enter()* -`libmodal.prompt`.enter({name}, {instruction} [, {completions}]) -`libmodal`#Prompt({name}, {instruction} [, {completions}]) +`libmodal.prompt`.enter({name}, {instruction} [, {completions}, {supressExit}]) +`libmodal`#Prompt({name}, {instruction} [, {completions}, {supressExit}]) Besides accepting user input like keys in |Normal-mode|, |libmodal| is also capable of prompting the user for |input| like |Cmdline-mode|. To @@ -301,6 +301,17 @@ FUNCTIONS *libmodal-usage-function Note: If no `help` command is defined, one will be created automatically. + {supressExit} Whether or not to automatically exit the mode upon an + press. + + - If |v:false|/`false`, then is automatically mapped to + exiting. + - If |v:true|/`true`, then is ignored unless specified by + the user. In such cases, the user should set the + `g:`{name}`ModeExit` variable to `true` when exiting is + desired. See |libmodal-examples-supress-exit|. + + See also: ~ |lua-eval| For type conversions between Vimscript to |Lua|. |libmodal-examples-prompt| For examples of this function.