diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2018-02-06 19:46:45 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2018-02-11 10:29:32 +0100 |
commit | 5d8da126d0b5ab7f550a74264ba434a2ad04280e (patch) | |
tree | c260eec7838c37eae30b0aa6b866993afd7649c7 /src/nvim/api/ui.c | |
parent | c205360f00e5be3847c22738260237bcc9f3ca1e (diff) | |
download | rneovim-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/api/ui.c')
-rw-r--r-- | src/nvim/api/ui.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/api/ui.c b/src/nvim/api/ui.c index 760c95eb5b..e53a45bd93 100644 --- a/src/nvim/api/ui.c +++ b/src/nvim/api/ui.c @@ -86,6 +86,7 @@ void nvim_ui_attach(uint64_t channel_id, Integer width, Integer height, ui->put = remote_ui_put; ui->bell = remote_ui_bell; ui->visual_bell = remote_ui_visual_bell; + ui->default_colors_set = remote_ui_default_colors_set; ui->update_fg = remote_ui_update_fg; ui->update_bg = remote_ui_update_bg; ui->update_sp = remote_ui_update_sp; @@ -243,7 +244,7 @@ static void push_call(UI *ui, char *name, Array args) static void remote_ui_highlight_set(UI *ui, HlAttrs attrs) { Array args = ARRAY_DICT_INIT; - Dictionary hl = hlattrs2dict(attrs); + Dictionary hl = hlattrs2dict(&attrs, ui->rgb); ADD(args, DICTIONARY_OBJ(hl)); push_call(ui, "highlight_set", args); |