aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/indent.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/indent.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/indent.c')
-rw-r--r--src/nvim/indent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/indent.c b/src/nvim/indent.c
index b7eb6f27f5..1c4486b67d 100644
--- a/src/nvim/indent.c
+++ b/src/nvim/indent.c
@@ -404,7 +404,7 @@ int get_number_indent(linenr_T lnum)
pos.lnum = 0;
// In format_lines() (i.e. not insert mode), fo+=q is needed too...
- if ((State & INSERT) || has_format_option(FO_Q_COMS)) {
+ if ((State & MODE_INSERT) || has_format_option(FO_Q_COMS)) {
lead_len = get_leader_len(ml_get(lnum), NULL, false, true);
}
regmatch.regprog = vim_regcomp(curbuf->b_p_flp, RE_MAGIC);
@@ -560,7 +560,7 @@ int get_expr_indent(void)
// Pretend to be in Insert mode, allow cursor past end of line for "o"
// command.
save_State = State;
- State = INSERT;
+ State = MODE_INSERT;
curwin->w_cursor = save_pos;
curwin->w_curswant = save_curswant;
curwin->w_set_curswant = save_set_curswant;