Mercurial > vim
diff src/structs.h @ 22699:e82579016863 v8.2.1898
patch 8.2.1898: command modifier parsing always uses global cmdmod
Commit: https://github.com/vim/vim/commit/e10044015841711b989f9a898d427bcc1fdb4c32
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 24 20:49:43 2020 +0200
patch 8.2.1898: command modifier parsing always uses global cmdmod
Problem: Command modifier parsing always uses global cmdmod.
Solution: Pass in cmdmod_T to use. Rename struct fields consistently.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 24 Oct 2020 21:00:05 +0200 |
parents | c996700d569f |
children | 92a100fc5e17 |
line wrap: on
line diff
--- a/src/structs.h +++ b/src/structs.h @@ -625,24 +625,26 @@ typedef struct */ typedef struct { - int cmod_flags; // CMOD_ flags, see below - int hide; // TRUE when ":hide" was used -# ifdef FEAT_BROWSE_CMD - int browse; // TRUE to invoke file dialog -# endif - int split; // flags for win_split() - int tab; // > 0 when ":tab" was used -# if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) - int confirm; // TRUE to invoke yes/no dialog -# endif - int keepalt; // TRUE when ":keepalt" was used - int keepmarks; // TRUE when ":keepmarks" was used - int keepjumps; // TRUE when ":keepjumps" was used - int lockmarks; // TRUE when ":lockmarks" was used - int keeppatterns; // TRUE when ":keeppatterns" was used - int noswapfile; // TRUE when ":noswapfile" was used - regmatch_T filter_regmatch; // set by :filter /pat/ - int filter_force; // set for :filter! + int cmod_flags; // CMOD_ flags +#define CMOD_SANDBOX 0x0001 // ":sandbox" +#define CMOD_SILENT 0x0002 // ":silent" +#define CMOD_ERRSILENT 0x0004 // ":silent!" +#define CMOD_UNSILENT 0x0008 // ":unsilent" +#define CMOD_NOAUTOCMD 0x0010 // ":noautocmd" +#define CMOD_HIDE 0x0020 // ":hide" +#define CMOD_BROWSE 0x0040 // ":browse" - invoke file dialog +#define CMOD_CONFIRM 0x0080 // ":confirm" - invoke yes/no dialog +#define CMOD_KEEPALT 0x0100 // ":keepalt" +#define CMOD_KEEPMARKS 0x0200 // ":keepmarks" +#define CMOD_KEEPJUMPS 0x0400 // ":keepjumps" +#define CMOD_LOCKMARKS 0x0800 // ":lockmarks" +#define CMOD_KEEPPATTERNS 0x1000 // ":keeppatterns" +#define CMOD_NOSWAPFILE 0x2000 // ":noswapfile" + + int cmod_split; // flags for win_split() + int cmod_tab; // > 0 when ":tab" was used + regmatch_T cmod_filter_regmatch; // set by :filter /pat/ + int cmod_filter_force; // set for :filter! int cmod_verbose; // non-zero to set 'verbose' @@ -655,15 +657,10 @@ typedef struct // 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; -#define CMOD_SANDBOX 0x01 -#define CMOD_SILENT 0x02 -#define CMOD_ERRSILENT 0x04 -#define CMOD_UNSILENT 0x08 -#define CMOD_NOAUTOCMD 0x10 - #define MF_SEED_LEN 8 struct memfile