aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ui.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-05-10 07:58:58 +0800
committerGitHub <noreply@github.com>2022-05-10 07:58:58 +0800
commit9aa5647e686e5420e5b9b51828ec7d55631f98ed (patch)
tree81172459aa5b8ac5c1f2e4e0b322e70267712ecd /src/nvim/ui.c
parentc55867b46d6758c4ff2e55d1bfb4cfc163182a12 (diff)
downloadrneovim-9aa5647e686e5420e5b9b51828ec7d55631f98ed.tar.gz
rneovim-9aa5647e686e5420e5b9b51828ec7d55631f98ed.tar.bz2
rneovim-9aa5647e686e5420e5b9b51828ec7d55631f98ed.zip
vim-patch:8.2.4911: the mode #defines are not clearly named (#18499)
Problem: The mode #defines are not clearly named. Solution: Prepend MODE_. Renumber them to put the mapped modes first. https://github.com/vim/vim/commit/249591057b4840785c50e41dd850efb8a8faf435 A hunk from the patch depends on patch 8.2.4861, which hasn't been ported yet, but that should be easy to notice.
Diffstat (limited to 'src/nvim/ui.c')
-rw-r--r--src/nvim/ui.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/ui.c b/src/nvim/ui.c
index ac20b00c71..2dc1e0ec25 100644
--- a/src/nvim/ui.c
+++ b/src/nvim/ui.c
@@ -549,13 +549,13 @@ void ui_check_mouse(void)
int checkfor = MOUSE_NORMAL; // assume normal mode
if (VIsual_active) {
checkfor = MOUSE_VISUAL;
- } else if (State == HITRETURN || State == ASKMORE || State == SETWSIZE) {
+ } else if (State == MODE_HITRETURN || State == MODE_ASKMORE || State == MODE_SETWSIZE) {
checkfor = MOUSE_RETURN;
- } else if (State & INSERT) {
+ } else if (State & MODE_INSERT) {
checkfor = MOUSE_INSERT;
- } else if (State & CMDLINE) {
+ } else if (State & MODE_CMDLINE) {
checkfor = MOUSE_COMMAND;
- } else if (State == CONFIRM || State == EXTERNCMD) {
+ } else if (State == MODE_CONFIRM || State == MODE_EXTERNCMD) {
checkfor = ' '; // don't use mouse for ":confirm" or ":!cmd"
}