diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-05-07 20:01:16 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-05-07 20:01:16 +0100 |
commit | 249591057b4840785c50e41dd850efb8a8faf435 (patch) | |
tree | e9ba171529cf753e7aab0ec9adf5be3fedc17d00 /src/gui_w32.c | |
parent | 9ff7d717aa3176de5c61de340deb93f41c7780fc (diff) |
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/gui_w32.c')
-rw-r--r-- | src/gui_w32.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui_w32.c b/src/gui_w32.c index 7bca9e7aca..3239da615f 100644 --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -1956,7 +1956,8 @@ process_message(void) } // 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 @@ _OnMenuSelect(HWND hwnd, WPARAM wParam, LPARAM lParam) 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 @@ _OnImeNotify(HWND hWnd, DWORD dwCommand, DWORD dwData UNUSED) 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 |