diff src/ex_docmd.c @ 28773:d770568e6c98 v8.2.4911

patch 8.2.4911: the mode #defines are not clearly named Commit: https://github.com/vim/vim/commit/249591057b4840785c50e41dd850efb8a8faf435 Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 7 20:01:16 2022 +0100 patch 8.2.4911: the mode #defines are not clearly named Problem: The mode #defines are not clearly named. Solution: Prepend MODE_. Renumber them to put the mapped modes first.
author Bram Moolenaar <Bram@vim.org>
date Sat, 07 May 2022 21:15:06 +0200
parents b44f15083faf
children d0241e74bfdb
line wrap: on
line diff
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -476,7 +476,7 @@ do_exmode(
 	exmode_active = EXMODE_VIM;
     else
 	exmode_active = EXMODE_NORMAL;
-    State = NORMAL;
+    State = MODE_NORMAL;
     may_trigger_modechanged();
 
     // When using ":global /pat/ visual" and then "Q" we return to continue
@@ -8328,7 +8328,7 @@ ex_redraw(exarg_T *eap)
     need_wait_return = FALSE;
 
     // When invoked from a callback or autocmd the command line may be active.
-    if (State & CMDLINE)
+    if (State & MODE_CMDLINE)
 	redrawcmdline();
 
     out_flush();
@@ -8676,7 +8676,7 @@ ex_startinsert(exarg_T *eap)
 
     // Ignore the command when already in Insert mode.  Inserting an
     // expression register that invokes a function can do this.
-    if (State & INSERT)
+    if (State & MODE_INSERT)
 	return;
 
     if (eap->cmdidx == CMD_startinsert)