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:
Björn Linse
2018-02-06 19:46:45 +01:00
parent c205360f00
commit 5d8da126d0
18 changed files with 195 additions and 289 deletions

View File

@@ -16,14 +16,6 @@ typedef enum {
} UIWidget;
#define UI_WIDGETS (kUIWildmenu + 1)
typedef struct {
bool bold, underline, undercurl, italic, reverse;
int foreground, background, special;
} HlAttrs;
#define HLATTRS_INIT \
((HlAttrs){ false, false, false, false, false, -1, -1, -1 })
typedef struct ui_t UI;
struct ui_t {