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/gui_w32.c b/src/gui_w32.c
index 7bca9e7..3239da6 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -1956,7 +1956,8 @@
}
// In modes where we are not typing, dead keys should behave
// normally
- else if (!(get_real_state() & (INSERT | CMDLINE | SELECTMODE)))
+ else if ((get_real_state()
+ & (MODE_INSERT | MODE_CMDLINE | MODE_SELECT)) == 0)
{
outputDeadKey_rePost(msg);
return;
@@ -4603,7 +4604,7 @@
if (((UINT) HIWORD(wParam)
& (0xffff ^ (MF_MOUSESELECT + MF_BITMAP + MF_POPUP)))
== MF_HILITE
- && (State & CMDLINE) == 0)
+ && (State & MODE_CMDLINE) == 0)
{
UINT idButton;
vimmenu_T *pMenu;
@@ -5593,8 +5594,8 @@
im_set_position(gui.row, gui.col);
// Disable langmap
- State &= ~LANGMAP;
- if (State & INSERT)
+ State &= ~MODE_LANGMAP;
+ if (State & MODE_INSERT)
{
# if defined(FEAT_KEYMAP)
// Unshown 'keymap' in status lines