summaryrefslogtreecommitdiffstats
path: root/src/ex_cmds.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-05-07 20:01:16 +0100
committerBram Moolenaar <Bram@vim.org>2022-05-07 20:01:16 +0100
commit249591057b4840785c50e41dd850efb8a8faf435 (patch)
treee9ba171529cf753e7aab0ec9adf5be3fedc17d00 /src/ex_cmds.c
parent9ff7d717aa3176de5c61de340deb93f41c7780fc (diff)
patch 8.2.4911: the mode #defines are not clearly namedv8.2.4911
Problem: The mode #defines are not clearly named. Solution: Prepend MODE_. Renumber them to put the mapped modes first.
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 9ea2fd6192..880bf5a3e4 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -3182,7 +3182,7 @@ do_ecmd(
redraw_curbuf_later(NOT_VALID); // redraw this buffer later
}
- if (p_im && (State & INSERT) == 0)
+ if (p_im && (State & MODE_INSERT) == 0)
need_start_insertmode = TRUE;
#ifdef FEAT_AUTOCHDIR
@@ -3271,9 +3271,9 @@ ex_append(exarg_T *eap)
if (empty && lnum == 1)
lnum = 0;
- State = INSERT; // behave like in Insert mode
+ State = MODE_INSERT; // behave like in Insert mode
if (curbuf->b_p_iminsert == B_IMODE_LMAP)
- State |= LANGMAP;
+ State |= MODE_LANGMAP;
for (;;)
{
@@ -3308,9 +3308,9 @@ ex_append(exarg_T *eap)
{
int save_State = State;
- // Set State to avoid the cursor shape to be set to INSERT mode
- // when getline() returns.
- State = CMDLINE;
+ // Set State to avoid the cursor shape to be set to MODE_INSERT
+ // state when getline() returns.
+ State = MODE_CMDLINE;
theline = eap->getline(
#ifdef FEAT_EVAL
eap->cstack->cs_looplevel > 0 ? -1 :
@@ -3366,7 +3366,7 @@ ex_append(exarg_T *eap)
empty = FALSE;
}
}
- State = NORMAL;
+ State = MODE_NORMAL;
if (eap->forceit)
curbuf->b_p_ai = !curbuf->b_p_ai;
@@ -4183,10 +4183,10 @@ ex_substitute(exarg_T *eap)
{
int typed = 0;
- // change State to CONFIRM, so that the mouse works
+ // change State to MODE_CONFIRM, so that the mouse works
// properly
save_State = State;
- State = CONFIRM;
+ State = MODE_CONFIRM;
setmouse(); // disable mouse in xterm
curwin->w_cursor.col = regmatch.startpos[0].col;
if (curwin->w_p_crb)