aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt15
-rw-r--r--runtime/doc/vim_diff.txt4
2 files changed, 18 insertions, 1 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 911fe43819..873200cb30 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -4665,10 +4665,23 @@ index({list}, {expr} [, {start} [, {ic}]]) *index()*
input({prompt} [, {text} [, {completion}]]) *input()*
+input({opts})
The result is a String, which is whatever the user typed on
the command-line. The {prompt} argument is either a prompt
string, or a blank string (for no prompt). A '\n' can be used
in the prompt to start a new line.
+
+ In the second form it accepts a single dictionary with the
+ following keys, any of which may be omitted:
+
+ Key Default Description ~
+ prompt "" Same as {prompt} in the first form.
+ default "" Same as {text} in the first form.
+ completion nothing Same as {completion} in the first form.
+ cancelreturn "" Same as {cancelreturn} from
+ |inputdialog()|. Also works with
+ input().
+
The highlighting set with |:echohl| is used for the prompt.
The input is entered just like a command-line, with the same
editing commands and mappings. There is a separate history
@@ -4710,6 +4723,7 @@ input({prompt} [, {text} [, {completion}]]) *input()*
:endfunction
inputdialog({prompt} [, {text} [, {cancelreturn}]]) *inputdialog()*
+inputdialog({opts})
Like |input()|, but when the GUI is running and text dialogs
are supported, a dialog window pops up to input the text.
Example: >
@@ -4721,7 +4735,6 @@ inputdialog({prompt} [, {text} [, {cancelreturn}]]) *inputdialog()*
omitted an empty string is returned.
Hitting <Enter> works like pressing the OK button. Hitting
<Esc> works like pressing the Cancel button.
- NOTE: Command-line completion is not supported.
inputlist({textlist}) *inputlist()*
{textlist} must be a |List| of strings. This |List| is
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index aba4420ebe..7f456bf473 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -244,6 +244,10 @@ Lua interface (|if_lua.txt|):
- Lua has direct access to Nvim |API| via `vim.api`.
- Currently, most legacy Vim features are missing.
+|input()| and |inputdialog()| gained support for each other’s features (return
+on cancel and completion respectively) via dictionary argument (replaces all
+other arguments if used).
+
==============================================================================
5. Missing legacy features *nvim-features-missing*