mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 15:08:35 +00:00
ui/tui: highlighting refactor
Make HlAttr contain highlighting state for both color modes (cterm and rgb). This allows us to implement termguicolors completely in the TUI. Simplify some logic duplicated between ui.c and screen.c. Also avoid some superfluous highlighting reset events.
This commit is contained in:
@@ -68,21 +68,4 @@ struct syn_state {
|
||||
* may have made the state invalid */
|
||||
};
|
||||
|
||||
// Structure shared between syntax.c, screen.c
|
||||
typedef struct attr_entry {
|
||||
int16_t rgb_ae_attr, cterm_ae_attr; // HL_BOLD, etc.
|
||||
RgbValue rgb_fg_color, rgb_bg_color, rgb_sp_color;
|
||||
int cterm_fg_color, cterm_bg_color;
|
||||
} attrentry_T;
|
||||
|
||||
#define ATTRENTRY_INIT { \
|
||||
.rgb_ae_attr = 0, \
|
||||
.cterm_ae_attr = 0, \
|
||||
.rgb_fg_color = -1, \
|
||||
.rgb_bg_color = -1, \
|
||||
.rgb_sp_color = -1, \
|
||||
.cterm_fg_color = 0, \
|
||||
.cterm_bg_color = 0, \
|
||||
}
|
||||
|
||||
#endif // NVIM_SYNTAX_DEFS_H
|
||||
|
Reference in New Issue
Block a user