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.
diff --git a/src/option.c b/src/option.c
index 518e787..92b1b93 100644
--- a/src/option.c
+++ b/src/option.c
@@ -2915,7 +2915,7 @@
{
if (p_im)
{
- if ((State & INSERT) == 0)
+ if ((State & MODE_INSERT) == 0)
need_start_insertmode = TRUE;
stop_insert_mode = FALSE;
}
@@ -3110,7 +3110,7 @@
// Only de-activate it here, it will be enabled when changing mode.
if (p_imdisable)
im_set_active(FALSE);
- else if (State & INSERT)
+ else if (State & MODE_INSERT)
// When the option is set from an autocommand, it may need to take
// effect right away.
im_set_active(curbuf->b_p_iminsert == B_IMODE_IM);