mirror of
https://github.com/neovim/neovim.git
synced 2025-11-28 05:00:44 +00:00
feat(tui): run TUI as external process
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user