From 29bc6dfabde2c8881a719175f3d6cbf422ac72c0 Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Thu, 8 Jan 2015 11:23:45 -0300 Subject: ui: Add 'rgb' parameter to ui_attach When set to false, nvim will send cterm color numbers with `highlight_set`. --- src/nvim/msgpack_rpc/remote_ui.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/nvim/msgpack_rpc/remote_ui.c') diff --git a/src/nvim/msgpack_rpc/remote_ui.c b/src/nvim/msgpack_rpc/remote_ui.c index e1cb474530..6a638df61c 100644 --- a/src/nvim/msgpack_rpc/remote_ui.c +++ b/src/nvim/msgpack_rpc/remote_ui.c @@ -61,8 +61,9 @@ static Object remote_ui_attach(uint64_t channel_id, uint64_t request_id, return NIL; } - if (args.size != 2 || args.items[0].type != kObjectTypeInteger + if (args.size != 3 || args.items[0].type != kObjectTypeInteger || args.items[1].type != kObjectTypeInteger + || args.items[2].type != kObjectTypeBoolean || args.items[0].data.integer <= 0 || args.items[1].data.integer <= 0) { api_set_error(error, Validation, _("Arguments must be a pair of positive integers " @@ -75,6 +76,7 @@ static Object remote_ui_attach(uint64_t channel_id, uint64_t request_id, UI *ui = xcalloc(1, sizeof(UI)); ui->width = (int)args.items[0].data.integer; ui->height = (int)args.items[1].data.integer; + ui->rgb = args.items[2].data.boolean; ui->data = data; ui->resize = remote_ui_resize; ui->clear = remote_ui_clear; -- cgit