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

@@ -1758,7 +1758,7 @@ apply_autocmds_retval(
static int
has_cursorhold(void)
{
return (first_autopat[(int)(get_real_state() == NORMAL_BUSY
return (first_autopat[(int)(get_real_state() == MODE_NORMAL_BUSY
? EVENT_CURSORHOLD : EVENT_CURSORHOLDI)] != NULL);
}
@@ -1777,7 +1777,7 @@ trigger_cursorhold(void)
&& !ins_compl_active())
{
state = get_real_state();
if (state == NORMAL_BUSY || (state & INSERT) != 0)
if (state == MODE_NORMAL_BUSY || (state & MODE_INSERT) != 0)
return TRUE;
}
return FALSE;