mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 03:16:31 +00:00
startup: always wait for UI with --embed, unless --headless also is supplied
This commit is contained in:
@@ -58,6 +58,21 @@ void remote_ui_disconnect(uint64_t channel_id)
|
||||
xfree(ui);
|
||||
}
|
||||
|
||||
/// Wait until ui has connected on stdio channel.
|
||||
void remote_ui_wait_for_attach(void)
|
||||
FUNC_API_NOEXPORT
|
||||
{
|
||||
Channel *channel = find_channel(CHAN_STDIO);
|
||||
if (!channel) {
|
||||
// this function should only be called in --embed mode, stdio channel
|
||||
// can be assumed.
|
||||
abort();
|
||||
}
|
||||
|
||||
LOOP_PROCESS_EVENTS_UNTIL(&main_loop, channel->events, -1,
|
||||
pmap_has(uint64_t)(connected_uis, CHAN_STDIO));
|
||||
}
|
||||
|
||||
void nvim_ui_attach(uint64_t channel_id, Integer width, Integer height,
|
||||
Dictionary options, Error *err)
|
||||
FUNC_API_SINCE(1) FUNC_API_REMOTE_ONLY
|
||||
|
Reference in New Issue
Block a user