mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 17:06:30 +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:
@@ -7,15 +7,17 @@
|
||||
typedef struct ucell UCell;
|
||||
typedef struct ugrid UGrid;
|
||||
|
||||
#define CELLBYTES (4 * (MAX_MCO+1))
|
||||
|
||||
struct ucell {
|
||||
char data[6 * MAX_MCO + 1];
|
||||
char data[CELLBYTES + 1];
|
||||
HlAttrs attrs;
|
||||
};
|
||||
|
||||
struct ugrid {
|
||||
int top, bot, left, right;
|
||||
int row, col;
|
||||
int bg, fg;
|
||||
HlAttrs clear_attrs;
|
||||
int width, height;
|
||||
HlAttrs attrs;
|
||||
UCell **cells;
|
||||
|
Reference in New Issue
Block a user