aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/funcs.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/eval/funcs.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/eval/funcs.c')
-rw-r--r--src/nvim/eval/funcs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c
index e2f456e399..520137af0a 100644
--- a/src/nvim/eval/funcs.c
+++ b/src/nvim/eval/funcs.c
@@ -1064,7 +1064,7 @@ static void f_col(typval_T *argvars, typval_T *rettv, FunPtr fptr)
/// "complete()" function
static void f_complete(typval_T *argvars, typval_T *rettv, FunPtr fptr)
{
- if ((State & INSERT) == 0) {
+ if ((State & MODE_INSERT) == 0) {
emsg(_("E785: complete() can only be used in Insert mode"));
return;
}
@@ -11211,7 +11211,7 @@ static void f_visualmode(typval_T *argvars, typval_T *rettv, FunPtr fptr)
/// "wildmenumode()" function
static void f_wildmenumode(typval_T *argvars, typval_T *rettv, FunPtr fptr)
{
- if (wild_menu_showing || ((State & CMDLINE) && pum_visible())) {
+ if (wild_menu_showing || ((State & MODE_CMDLINE) && pum_visible())) {
rettv->vval.v_number = 1;
}
}