refactor: move menu non-symbols to menu_defs.h (#19778)

This commit is contained in:
zeertzjq
2022-08-15 10:04:05 +08:00
committed by GitHub
parent 36acb803c6
commit 1c164689a4
7 changed files with 76 additions and 72 deletions

View File

@@ -1132,43 +1132,6 @@ typedef struct {
pos_T w_cursor_corr; // corrected cursor position
} pos_save_T;
/// Indices into vimmenu_T->strings[] and vimmenu_T->noremap[] for each mode
/// \addtogroup MENU_INDEX
/// @{
enum {
MENU_INDEX_INVALID = -1,
MENU_INDEX_NORMAL = 0,
MENU_INDEX_VISUAL = 1,
MENU_INDEX_SELECT = 2,
MENU_INDEX_OP_PENDING = 3,
MENU_INDEX_INSERT = 4,
MENU_INDEX_CMDLINE = 5,
MENU_INDEX_TERMINAL = 6,
MENU_INDEX_TIP = 7,
MENU_MODES = 8,
};
typedef struct VimMenu vimmenu_T;
struct VimMenu {
int modes; ///< Which modes is this menu visible for
int enabled; ///< for which modes the menu is enabled
char *name; ///< Name of menu, possibly translated
char *dname; ///< Displayed Name ("name" without '&')
char *en_name; ///< "name" untranslated, NULL when
///< was not translated
char *en_dname; ///< NULL when "dname" untranslated
int mnemonic; ///< mnemonic key (after '&')
char *actext; ///< accelerator text (after TAB)
long priority; ///< Menu order priority
char *strings[MENU_MODES]; ///< Mapped string for each mode
int noremap[MENU_MODES]; ///< A \ref REMAP_VALUES flag for each mode
bool silent[MENU_MODES]; ///< A silent flag for each mode
vimmenu_T *children; ///< Children of sub-menu
vimmenu_T *parent; ///< Parent of menu
vimmenu_T *next; ///< Next item in menu
};
/// Structure which contains all information that belongs to a window.
///
/// All row numbers are relative to the start of the window, except w_winrow.