mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 22:18:33 +00:00
vim-patch:9.0.0064: confusing error when using "q:" in command line window
Problem: Confusing error when using "q:" in command line window.
Solution: Check for the situation and give a better error message.
(closes vim/vim#10756)
c963ec31a0
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -107,6 +107,8 @@ static int VIsual_mode_orig = NUL; // saved Visual mode
|
||||
#endif
|
||||
|
||||
static const char e_changelist_is_empty[] = N_("E664: Changelist is empty");
|
||||
static const char e_cmdline_window_already_open[]
|
||||
= N_("E1292: Command-line window is already open");
|
||||
|
||||
static inline void normal_state_init(NormalState *s)
|
||||
{
|
||||
@@ -6372,6 +6374,10 @@ static void nv_record(cmdarg_T *cap)
|
||||
}
|
||||
|
||||
if (cap->nchar == ':' || cap->nchar == '/' || cap->nchar == '?') {
|
||||
if (cmdwin_type != 0) {
|
||||
emsg(_(e_cmdline_window_already_open));
|
||||
return;
|
||||
}
|
||||
stuffcharReadbuff(cap->nchar);
|
||||
stuffcharReadbuff(K_CMDWIN);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user