mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 06:46:07 +00:00
fix(inccommand): skip input() during preview #35272
Problem: During preview, the `input` still prompts the user to enter something that won't be used later, which could be a bit confusing. e.g., `:s/a/\=input("")`. Solution: Make the input() return early during 'inccommand' preview.
This commit is contained in:
@@ -4819,6 +4819,10 @@ void get_user_input(const typval_T *const argvars, typval_T *const rettv, const
|
||||
rettv->v_type = VAR_STRING;
|
||||
rettv->vval.v_string = NULL;
|
||||
|
||||
if (cmdpreview) {
|
||||
return;
|
||||
}
|
||||
|
||||
const char *prompt;
|
||||
const char *defstr = "";
|
||||
typval_T *cancelreturn = NULL;
|
||||
|
Reference in New Issue
Block a user