aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.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/option.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/option.c')
-rw-r--r--src/nvim/option.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index e738c6c3b9..81b1ab5b2b 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -4053,7 +4053,7 @@ static char *set_bool_option(const int opt_idx, char_u *const varp, const int va
} else if ((int *)varp == &p_im) {
// when 'insertmode' is set from an autocommand need to do work here
if (p_im) {
- if ((State & INSERT) == 0) {
+ if ((State & MODE_INSERT) == 0) {
need_start_insertmode = true;
}
stop_insert_mode = false;
@@ -8260,7 +8260,7 @@ dict_T *get_winbuf_options(const int bufopt)
long get_scrolloff_value(win_T *wp)
{
// Disallow scrolloff in terminal-mode. #11915
- if (State & TERM_FOCUS) {
+ if (State & MODE_TERMINAL) {
return 0;
}
return wp->w_p_so < 0 ? p_so : wp->w_p_so;