From 249591057b4840785c50e41dd850efb8a8faf435 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 7 May 2022 20:01:16 +0100 Subject: 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. --- src/fileio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/fileio.c') diff --git a/src/fileio.c b/src/fileio.c index 439789e598..8318452dfc 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2945,7 +2945,7 @@ check_for_cryptkey( // 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 @@ buf_check_timestamp( } else #endif - if (State > NORMAL_BUSY || (State & CMDLINE) || already_warned) + if (State > MODE_NORMAL_BUSY || (State & MODE_CMDLINE) + || already_warned) { if (*mesg2 != NUL) { -- cgit v1.2.3