diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-09-24 06:51:02 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2024-09-26 22:15:28 +0800 |
commit | c2fb1fc700db28cb554be9da8e79443b5d3a5fe9 (patch) | |
tree | b90b04c1b252237d2d705422eebd8eef6d17d96f /runtime/doc/builtin.txt | |
parent | 66197dde7084484c9d23fa488b2288bcae364ba7 (diff) | |
download | rneovim-c2fb1fc700db28cb554be9da8e79443b5d3a5fe9.tar.gz rneovim-c2fb1fc700db28cb554be9da8e79443b5d3a5fe9.tar.bz2 rneovim-c2fb1fc700db28cb554be9da8e79443b5d3a5fe9.zip |
vim-patch:9.1.0741: No way to get prompt for input()/confirm()
Problem: No way to get prompt for input()/confirm()
Solution: add getcmdprompt() function (Shougo Matsushita)
(Shougo Matsushita)
closes: vim/vim#15667
https://github.com/vim/vim/commit/6908428560a0d6ae27bf7af6fcb6dc362e31926c
Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Diffstat (limited to 'runtime/doc/builtin.txt')
-rw-r--r-- | runtime/doc/builtin.txt | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 0e3e09ea76..d76cf96762 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -2361,18 +2361,18 @@ getcmdcompltype() *getcmdcompltype()* Only works when the command line is being edited, thus requires use of |c_CTRL-\_e| or |c_CTRL-R_=|. See |:command-completion| for the return string. - Also see |getcmdtype()|, |setcmdpos()|, |getcmdline()| and - |setcmdline()|. + Also see |getcmdtype()|, |setcmdpos()|, |getcmdline()|, + |getcmdprompt()| and |setcmdline()|. Returns an empty string when completion is not defined. getcmdline() *getcmdline()* - Return the current command-line. Only works when the command - line is being edited, thus requires use of |c_CTRL-\_e| or - |c_CTRL-R_=|. + Return the current command-line input. Only works when the + command line is being edited, thus requires use of + |c_CTRL-\_e| or |c_CTRL-R_=|. Example: >vim cmap <F7> <C-\>eescape(getcmdline(), ' \')<CR> -< Also see |getcmdtype()|, |getcmdpos()|, |setcmdpos()| and - |setcmdline()|. +< Also see |getcmdtype()|, |getcmdpos()|, |setcmdpos()|, + |getcmdprompt()| and |setcmdline()|. Returns an empty string when entering a password or using |inputsecret()|. @@ -2382,8 +2382,16 @@ getcmdpos() *getcmdpos()* Only works when editing the command line, thus requires use of |c_CTRL-\_e| or |c_CTRL-R_=| or an expression mapping. Returns 0 otherwise. - Also see |getcmdtype()|, |setcmdpos()|, |getcmdline()| and - |setcmdline()|. + Also see |getcmdtype()|, |setcmdpos()|, |getcmdline()|, + |getcmdprompt()| and |setcmdline()|. + +getcmdprompt() *getcmdprompt()* + Return the current command-line prompt when using functions + like |input()| or |confirm()|. + Only works when the command line is being edited, thus + requires use of |c_CTRL-\_e| or |c_CTRL-R_=|. + Also see |getcmdtype()|, |getcmdline()|, |getcmdpos()|, + |setcmdpos()| and |setcmdline()|. getcmdscreenpos() *getcmdscreenpos()* Return the screen position of the cursor in the command line |