diff options
author | hlpr98 <hlpr98@gmail.com> | 2019-05-27 22:04:24 +0530 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2022-12-31 10:43:28 +0100 |
commit | 24488169564c39a506c235bf6a33b8e23a8cb528 (patch) | |
tree | 3b30c1fcc3b4ce2fef81d45eebe61baa4f0315ed /src/nvim/ui.c | |
parent | 4ace9e7e417fe26c8b73ff1d6042e6e4f3df9ebf (diff) | |
download | rneovim-24488169564c39a506c235bf6a33b8e23a8cb528.tar.gz rneovim-24488169564c39a506c235bf6a33b8e23a8cb528.tar.bz2 rneovim-24488169564c39a506c235bf6a33b8e23a8cb528.zip |
feat(tui): run TUI as external process
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)); |