diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-01-08 11:23:45 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-01-12 09:47:41 -0300 |
commit | 74c247f75baec5778296adf164831c5ffea0fb88 (patch) | |
tree | 1950d2681c1d659edf86477188020f04ea1492e6 /src/nvim/msgpack_rpc/remote_ui.c | |
parent | a8fe32040b039c134087c4c0d8c9e14bf50fef1a (diff) | |
download | rneovim-74c247f75baec5778296adf164831c5ffea0fb88.tar.gz rneovim-74c247f75baec5778296adf164831c5ffea0fb88.tar.bz2 rneovim-74c247f75baec5778296adf164831c5ffea0fb88.zip |
ui: Add 'rgb' parameter to ui_attach
When set to false, nvim will send cterm color numbers with `highlight_set`.
Diffstat (limited to 'src/nvim/msgpack_rpc/remote_ui.c')
-rw-r--r-- | src/nvim/msgpack_rpc/remote_ui.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; |