diff options
| author | Björn Linse <bjorn.linse@gmail.com> | 2017-12-12 18:23:19 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-12-12 18:23:19 +0100 |
| commit | 34057045beca40406673ff421a4ef1e8e8c08853 (patch) | |
| tree | ad32d3d1f5e05cd1f522e67bcd42f8968f6dbf21 /src/nvim/tui | |
| parent | f976826690a975e03bb57f6cc84955c59ee6cff4 (diff) | |
| download | rneovim-34057045beca40406673ff421a4ef1e8e8c08853.tar.gz rneovim-34057045beca40406673ff421a4ef1e8e8c08853.tar.bz2 rneovim-34057045beca40406673ff421a4ef1e8e8c08853.zip | |
ui: forward relevant option updates to UIs (#7520)
also make termguicolors mutable after startup
Diffstat (limited to 'src/nvim/tui')
| -rw-r--r-- | src/nvim/tui/tui.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index 9ff1acf64a..49aa41b9b0 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -151,6 +151,7 @@ UI *tui_start(void) ui->suspend = tui_suspend; ui->set_title = tui_set_title; ui->set_icon = tui_set_icon; + ui->option_set= tui_option_set; ui->event = tui_event; memset(ui->ui_ext, 0, sizeof(ui->ui_ext)); @@ -1136,6 +1137,14 @@ static void tui_set_icon(UI *ui, String icon) { } +static void tui_option_set(UI *ui, String name, Object value) +{ + if (strequal(name.data, "termguicolors")) { + // NB: value for bridge is set in ui_bridge.c + ui->rgb = value.data.boolean; + } +} + // NB: if we start to use this, the ui_bridge must be updated // to make a copy for the tui thread static void tui_event(UI *ui, char *name, Array args, bool *args_consumed) |