diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-06-14 20:46:18 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-06-14 21:12:27 +0800 |
commit | 0a0cda95286bf62fbce2776a0c0081cea39a88a8 (patch) | |
tree | 03f43740a5822d058abf8822e9bfe8b561d460be /src/nvim/ex_cmds_defs.h | |
parent | 6130b4a84b41b71f4c0c58093a29585c6c67ff16 (diff) | |
download | rneovim-0a0cda95286bf62fbce2776a0c0081cea39a88a8.tar.gz rneovim-0a0cda95286bf62fbce2776a0c0081cea39a88a8.tar.bz2 rneovim-0a0cda95286bf62fbce2776a0c0081cea39a88a8.zip |
vim-patch:8.2.5088: value of cmod_verbose is a bit complicated to use
Problem: Value of cmod_verbose is a bit complicated to use.
Solution: Use zero for not set, value + 1 when set. (closes vim/vim#10564)
https://github.com/vim/vim/commit/cd7496382efc9e6748326c6cda7f01003fa07063
Omit has_cmdmod(): only used for Vim9 script
Diffstat (limited to 'src/nvim/ex_cmds_defs.h')
-rw-r--r-- | src/nvim/ex_cmds_defs.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/nvim/ex_cmds_defs.h b/src/nvim/ex_cmds_defs.h index ab6f448c66..8280f99547 100644 --- a/src/nvim/ex_cmds_defs.h +++ b/src/nvim/ex_cmds_defs.h @@ -264,28 +264,27 @@ enum { /// flag. This needs to be saved for recursive commands, put them in a /// structure for easy manipulation. typedef struct { - int cmod_flags; ///< CMOD_ flags + int cmod_flags; ///< CMOD_ flags - int cmod_split; ///< flags for win_split() - int cmod_tab; ///< > 0 when ":tab" was used + int cmod_split; ///< flags for win_split() + int cmod_tab; ///< > 0 when ":tab" was used regmatch_T cmod_filter_regmatch; ///< set by :filter /pat/ - bool cmod_filter_force; ///< set for :filter! + bool cmod_filter_force; ///< set for :filter! - int cmod_verbose; ///< non-zero to set 'verbose', -1 is used for zero override + int cmod_verbose; ///< 0 if not set, > 0 to set 'verbose' to cmod_verbose - 1 // values for undo_cmdmod() - char_u *cmod_save_ei; ///< saved value of 'eventignore' - int cmod_did_sandbox; ///< set when "sandbox" was incremented - long cmod_verbose_save; ///< if 'verbose' was set: value of p_verbose plus one - int cmod_save_msg_silent; ///< if non-zero: saved value of msg_silent + 1 - int cmod_save_msg_scroll; ///< for restoring msg_scroll - int cmod_did_esilent; ///< incremented when emsg_silent is + char_u *cmod_save_ei; ///< saved value of 'eventignore' + int cmod_did_sandbox; ///< set when "sandbox" was incremented + long cmod_verbose_save; ///< if 'verbose' was set: value of p_verbose plus one + int cmod_save_msg_silent; ///< if non-zero: saved value of msg_silent + 1 + int cmod_save_msg_scroll; ///< for restoring msg_scroll + int cmod_did_esilent; ///< incremented when emsg_silent is } cmdmod_T; /// Stores command modifier info used by `nvim_parse_cmd` typedef struct { cmdmod_T cmdmod; - int verbose; ///< unlike cmod_verbose, -1 is used when unspecified and 0 for zero override struct { bool file; bool bar; |