summaryrefslogtreecommitdiff
path: root/src/screen.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-05-07 20:01:16 +0100
committerBram Moolenaar <Bram@vim.org>2022-05-07 20:01:16 +0100
commit249591057b4840785c50e41dd850efb8a8faf435 (patch)
treee9ba171529cf753e7aab0ec9adf5be3fedc17d00 /src/screen.c
parent9ff7d717aa3176de5c61de340deb93f41c7780fc (diff)
downloadvim-git-249591057b4840785c50e41dd850efb8a8faf435.tar.gz
patch 8.2.4911: the mode #defines are not clearly namedv8.2.4911
Problem: The mode #defines are not clearly named. Solution: Prepend MODE_. Renumber them to put the mapped modes first.
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/screen.c b/src/screen.c
index 1a5cb1556..e509e9d62 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -68,13 +68,13 @@ conceal_cursor_line(win_T *wp)
if (*wp->w_p_cocu == NUL)
return FALSE;
- if (get_real_state() & VISUAL)
+ if (get_real_state() & MODE_VISUAL)
c = 'v';
- else if (State & INSERT)
+ else if (State & MODE_INSERT)
c = 'i';
- else if (State & NORMAL)
+ else if (State & MODE_NORMAL)
c = 'n';
- else if (State & CMDLINE)
+ else if (State & MODE_CMDLINE)
c = 'c';
else
return FALSE;
@@ -4164,7 +4164,7 @@ showmode(void)
int sub_attr;
do_mode = ((p_smd && msg_silent == 0)
- && ((State & INSERT)
+ && ((State & MODE_INSERT)
|| restart_edit != NUL
|| VIsual_active));
if (do_mode || reg_recording != 0)
@@ -4238,7 +4238,7 @@ showmode(void)
msg_puts_attr(_(" VREPLACE"), attr);
else if (State & REPLACE_FLAG)
msg_puts_attr(_(" REPLACE"), attr);
- else if (State & INSERT)
+ else if (State & MODE_INSERT)
{
#ifdef FEAT_RIGHTLEFT
if (p_ri)
@@ -4258,7 +4258,7 @@ showmode(void)
msg_puts_attr(_(" Hebrew"), attr);
#endif
#ifdef FEAT_KEYMAP
- if (State & LANGMAP)
+ if (State & MODE_LANGMAP)
{
# ifdef FEAT_ARABIC
if (curwin->w_p_arab)
@@ -4270,7 +4270,7 @@ showmode(void)
msg_puts_attr((char *)NameBuff, attr);
}
#endif
- if ((State & INSERT) && p_paste)
+ if ((State & MODE_INSERT) && p_paste)
msg_puts_attr(_(" (paste)"), attr);
if (VIsual_active)