aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ugrid.h
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2018-02-06 19:46:45 +0100
committerBjörn Linse <bjorn.linse@gmail.com>2018-02-11 10:29:32 +0100
commit5d8da126d0b5ab7f550a74264ba434a2ad04280e (patch)
treec260eec7838c37eae30b0aa6b866993afd7649c7 /src/nvim/ugrid.h
parentc205360f00e5be3847c22738260237bcc9f3ca1e (diff)
downloadrneovim-5d8da126d0b5ab7f550a74264ba434a2ad04280e.tar.gz
rneovim-5d8da126d0b5ab7f550a74264ba434a2ad04280e.tar.bz2
rneovim-5d8da126d0b5ab7f550a74264ba434a2ad04280e.zip
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.
Diffstat (limited to 'src/nvim/ugrid.h')
-rw-r--r--src/nvim/ugrid.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/ugrid.h b/src/nvim/ugrid.h
index 1cf047502d..60c9068eb1 100644
--- a/src/nvim/ugrid.h
+++ b/src/nvim/ugrid.h
@@ -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;