1
0
forked from aniani/vim

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.
This commit is contained in:
Bram Moolenaar
2022-05-07 20:01:16 +01:00
parent 9ff7d717aa
commit 249591057b
49 changed files with 514 additions and 490 deletions

View File

@@ -2915,7 +2915,7 @@ set_bool_option(
{
if (p_im)
{
if ((State & INSERT) == 0)
if ((State & MODE_INSERT) == 0)
need_start_insertmode = TRUE;
stop_insert_mode = FALSE;
}
@@ -3110,7 +3110,7 @@ set_bool_option(
// 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);