syntax: Refactor to store all term and gui attributes independently

Now the attrentry_T structure will store all attributes in separate fields for
cterm and rgb UIs.
This commit is contained in:
Thiago de Arruda
2015-02-13 12:06:08 -03:00
parent 9a2dd7c498
commit d8f3458ec7
8 changed files with 192 additions and 425 deletions

View File

@@ -67,23 +67,11 @@ struct syn_state {
* may have made the state invalid */
};
/*
* Structure shared between syntax.c, screen.c and gui_x11.c.
*/
// Structure shared between syntax.c, screen.c
typedef struct attr_entry {
short ae_attr; /* HL_BOLD, etc. */
RgbValue fg_color, bg_color;
union {
struct {
char_u *start; /* start escape sequence */
char_u *stop; /* stop escape sequence */
} term;
struct {
/* These colors need to be > 8 bits to hold 256. */
uint16_t fg_color; /* foreground color number */
uint16_t bg_color; /* background color number */
} cterm;
} ae_u;
short rgb_ae_attr, cterm_ae_attr; // HL_BOLD, etc.
RgbValue rgb_fg_color, rgb_bg_color;
int cterm_fg_color, cterm_bg_color;
} attrentry_T;
#endif // NVIM_SYNTAX_DEFS_H