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/fileio.c b/src/fileio.c
index 439789e..8318452 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2945,7 +2945,7 @@
// When starting to edit a new file which does not have encryption, clear
// the 'key' option, except when starting up (called with -x argument)
else if (newfile && *curbuf->b_p_key != NUL && !starting)
- set_option_value((char_u *)"key", 0L, (char_u *)"", OPT_LOCAL);
+ set_option_value_give_err((char_u *)"key", 0L, (char_u *)"", OPT_LOCAL);
return cryptkey;
}
@@ -4264,7 +4264,8 @@
}
else
#endif
- if (State > NORMAL_BUSY || (State & CMDLINE) || already_warned)
+ if (State > MODE_NORMAL_BUSY || (State & MODE_CMDLINE)
+ || already_warned)
{
if (*mesg2 != NUL)
{