diff options
Diffstat (limited to 'src/nvim/ui.c')
-rw-r--r-- | src/nvim/ui.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nvim/ui.c b/src/nvim/ui.c index 7bde8d2f5a..232bfc8b3c 100644 --- a/src/nvim/ui.c +++ b/src/nvim/ui.c @@ -35,6 +35,7 @@ #include "nvim/ui_compositor.h" #include "nvim/vim.h" #include "nvim/window.h" +#include "nvim/msgpack_rpc/channel.h" #ifdef FEAT_TUI # include "nvim/tui/tui.h" #else @@ -150,6 +151,19 @@ void ui_builtin_start(void) #endif } +uint64_t ui_client_start(int argc, char **argv, bool pass_stdin) +{ + ui_comp_detach(uis[1]); // Bypassing compositor in client + uint64_t rv = ui_client_start_server(argc, argv, pass_stdin); + return rv; +} + +UI* ui_get_by_index(int idx) +{ + assert(idx < 16); + return uis[idx]; +} + bool ui_rgb_attached(void) { if (!headless_mode && p_tgc) { @@ -228,6 +242,7 @@ void ui_refresh(void) screen_resize(width, height); p_lz = save_p_lz; } else { + // TODO: not like this Array args = ARRAY_DICT_INIT; ADD(args, INTEGER_OBJ((int)width)); ADD(args, INTEGER_OBJ((int)height)); |