mirror of
https://github.com/neovim/neovim.git
synced 2025-10-20 16:51:48 +00:00
fix(prompt): cursor on prompt line, disallow ":edit" #34736
* fix: ensure :edit can not be use on prompt buffer * fix: starting editing on prompt-line doesn't put cursor at the end
This commit is contained in:
@@ -5718,6 +5718,12 @@ static void ex_edit(exarg_T *eap)
|
||||
return;
|
||||
}
|
||||
|
||||
// prevent use of :edit on prompt-buffers
|
||||
if (bt_prompt(curbuf) && eap->cmdidx == CMD_edit && *eap->arg == NUL) {
|
||||
emsg("cannot :edit a prompt buffer");
|
||||
return;
|
||||
}
|
||||
|
||||
do_exedit(eap, NULL);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user