aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/msgpack_rpc/remote_ui.c
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-12-12 16:25:11 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2015-01-13 11:53:27 -0300
commitfc8f7686905bf0441f4a2f35a65dad85fe813df3 (patch)
tree7e3ae9b093fe399752da9f4ddfa04059c9348b3f /src/nvim/msgpack_rpc/remote_ui.c
parent1ccbd94beec5c1f5d91b0b084062afa7908dd69e (diff)
downloadrneovim-fc8f7686905bf0441f4a2f35a65dad85fe813df3.tar.gz
rneovim-fc8f7686905bf0441f4a2f35a65dad85fe813df3.tar.bz2
rneovim-fc8f7686905bf0441f4a2f35a65dad85fe813df3.zip
ui: Add update_fg/update_bg methods
It is necessary to notify the UI when the default background/foreground colors change in order to render correctly.
Diffstat (limited to 'src/nvim/msgpack_rpc/remote_ui.c')
-rw-r--r--src/nvim/msgpack_rpc/remote_ui.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/msgpack_rpc/remote_ui.c b/src/nvim/msgpack_rpc/remote_ui.c
index f980a77b4c..af7b82dfd4 100644
--- a/src/nvim/msgpack_rpc/remote_ui.c
+++ b/src/nvim/msgpack_rpc/remote_ui.c
@@ -67,6 +67,8 @@ Object remote_ui_attach(uint64_t channel_id, uint64_t request_id, Array args,
ui->put = remote_ui_put;
ui->bell = remote_ui_bell;
ui->visual_bell = remote_ui_visual_bell;
+ ui->update_fg = remote_ui_update_fg;
+ ui->update_bg = remote_ui_update_bg;
ui->flush = remote_ui_flush;
ui->suspend = remote_ui_suspend;
pmap_put(uint64_t)(connected_uis, channel_id, ui);
@@ -266,6 +268,20 @@ static void remote_ui_visual_bell(UI *ui)
push_call(ui, "visual_bell", args);
}
+static void remote_ui_update_fg(UI *ui, int fg)
+{
+ Array args = ARRAY_DICT_INIT;
+ ADD(args, INTEGER_OBJ(fg));
+ push_call(ui, "update_fg", args);
+}
+
+static void remote_ui_update_bg(UI *ui, int bg)
+{
+ Array args = ARRAY_DICT_INIT;
+ ADD(args, INTEGER_OBJ(bg));
+ push_call(ui, "update_bg", args);
+}
+
static void remote_ui_flush(UI *ui)
{
UIData *data = ui->data;