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

6908428560

Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
This commit is contained in:
zeertzjq
2024-09-24 06:51:02 +08:00
parent 66197dde70
commit c2fb1fc700
7 changed files with 102 additions and 29 deletions

View File

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