diff options
Diffstat (limited to 'src/nvim/ex_cmds_defs.h')
-rw-r--r-- | src/nvim/ex_cmds_defs.h | 56 |
1 files changed, 33 insertions, 23 deletions
diff --git a/src/nvim/ex_cmds_defs.h b/src/nvim/ex_cmds_defs.h index a5c9c6be2d..8280f99547 100644 --- a/src/nvim/ex_cmds_defs.h +++ b/src/nvim/ex_cmds_defs.h @@ -209,10 +209,6 @@ struct exarg { LineGetter getline; ///< Function used to get the next line void *cookie; ///< argument for getline() cstack_T *cstack; ///< condition stack for ":if" etc. - long verbose_save; ///< saved value of p_verbose - int save_msg_silent; ///< saved value of msg_silent - int did_esilent; ///< how many times emsg_silent was incremented - bool did_sandbox; ///< when true did sandbox++ }; #define FORCE_BIN 1 // ":edit ++bin file" @@ -247,33 +243,47 @@ struct expand { #define XP_BS_ONE 1 // uses one backslash before a space #define XP_BS_THREE 2 // uses three backslashes before a space +enum { + CMOD_SANDBOX = 0x0001, ///< ":sandbox" + CMOD_SILENT = 0x0002, ///< ":silent" + CMOD_ERRSILENT = 0x0004, ///< ":silent!" + CMOD_UNSILENT = 0x0008, ///< ":unsilent" + CMOD_NOAUTOCMD = 0x0010, ///< ":noautocmd" + CMOD_HIDE = 0x0020, ///< ":hide" + CMOD_BROWSE = 0x0040, ///< ":browse" - invoke file dialog + CMOD_CONFIRM = 0x0080, ///< ":confirm" - invoke yes/no dialog + CMOD_KEEPALT = 0x0100, ///< ":keepalt" + CMOD_KEEPMARKS = 0x0200, ///< ":keepmarks" + CMOD_KEEPJUMPS = 0x0400, ///< ":keepjumps" + CMOD_LOCKMARKS = 0x0800, ///< ":lockmarks" + CMOD_KEEPPATTERNS = 0x1000, ///< ":keeppatterns" + CMOD_NOSWAPFILE = 0x2000, ///< ":noswapfile" +}; + /// Command modifiers ":vertical", ":browse", ":confirm", ":hide", etc. set a /// flag. This needs to be saved for recursive commands, put them in a /// structure for easy manipulation. typedef struct { - int split; ///< flags for win_split() - int tab; ///< > 0 when ":tab" was used - bool browse; ///< true to invoke file dialog - bool confirm; ///< true to invoke yes/no dialog - bool hide; ///< true when ":hide" was used - bool keepalt; ///< true when ":keepalt" was used - bool keepjumps; ///< true when ":keepjumps" was used - bool keepmarks; ///< true when ":keepmarks" was used - bool keeppatterns; ///< true when ":keeppatterns" was used - bool lockmarks; ///< true when ":lockmarks" was used - bool noswapfile; ///< true when ":noswapfile" was used - char *save_ei; ///< saved value of 'eventignore' - regmatch_T filter_regmatch; ///< set by :filter /pat/ - bool filter_force; ///< set for :filter! + int cmod_flags; ///< CMOD_ flags + + 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! + + 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 } cmdmod_T; /// Stores command modifier info used by `nvim_parse_cmd` typedef struct { - bool silent; - bool emsg_silent; - bool sandbox; - bool noautocmd; - long verbose; cmdmod_T cmdmod; struct { bool file; |