diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-05-10 07:58:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-10 07:58:58 +0800 |
commit | 9aa5647e686e5420e5b9b51828ec7d55631f98ed (patch) | |
tree | 81172459aa5b8ac5c1f2e4e0b322e70267712ecd /src/nvim/globals.h | |
parent | c55867b46d6758c4ff2e55d1bfb4cfc163182a12 (diff) | |
download | rneovim-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/globals.h')
-rw-r--r-- | src/nvim/globals.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/globals.h b/src/nvim/globals.h index 620af9444c..ff70687fae 100644 --- a/src/nvim/globals.h +++ b/src/nvim/globals.h @@ -605,7 +605,7 @@ EXTERN pos_T Insstart; // This is where the latest // op_insert(), to detect correctly where inserting by the user started. EXTERN pos_T Insstart_orig; -// Stuff for VREPLACE mode. +// Stuff for MODE_VREPLACE state. EXTERN linenr_T orig_line_count INIT(= 0); // Line count when "gR" started EXTERN int vr_lines_changed INIT(= 0); // #Lines changed by "gR" so far @@ -631,13 +631,13 @@ EXTERN char_u *fenc_default INIT(= NULL); /// "State" is the main state of Vim. /// There are other variables that modify the state: -/// Visual_mode: When State is NORMAL or INSERT. -/// finish_op : When State is NORMAL, after typing the operator and +/// Visual_mode: When State is MODE_NORMAL or MODE_INSERT. +/// finish_op : When State is MODE_NORMAL, after typing the operator and /// before typing the motion command. /// motion_force: Last motion_force from do_pending_operator() /// debug_mode: Debug mode -EXTERN int State INIT(= NORMAL); // This is the current state of the - // command interpreter. +EXTERN int State INIT(= MODE_NORMAL); + EXTERN bool debug_mode INIT(= false); EXTERN bool finish_op INIT(= false); // true while an operator is pending EXTERN long opcount INIT(= 0); // count for pending operator @@ -748,8 +748,8 @@ EXTERN int global_busy INIT(= 0); ///< set when :global is executing EXTERN bool listcmd_busy INIT(= false); ///< set when :argdo, :windo or :bufdo is executing EXTERN bool need_start_insertmode INIT(= false); ///< start insert mode soon -#define MODE_MAX_LENGTH 4 // max mode length returned in get_mode() - // including the final NUL character +#define MODE_MAX_LENGTH 4 // max mode length returned in get_mode(), + // including the terminating NUL EXTERN char last_mode[MODE_MAX_LENGTH] INIT(= "n"); EXTERN char_u *last_cmdline INIT(= NULL); // last command line (for ":) |