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 /src/nvim/eval/funcs.c | |
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 'src/nvim/eval/funcs.c')
-rw-r--r-- | src/nvim/eval/funcs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index e8b9288717..4a96c9a3f3 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -813,6 +813,8 @@ static void f_confirm(typval_T *argvars, typval_T *rettv, EvalFuncData fptr) const char *message = tv_get_string_chk(&argvars[0]); if (message == NULL) { error = true; + } else { + set_prompt(message); } if (argvars[1].v_type != VAR_UNKNOWN) { buttons = tv_get_string_buf_chk(&argvars[1], buf); |