feat(server): allow embed with listen (#25709)

connection from any channel or stdio will unblock
remote_ui_wait_for_attach.  Wait on stdio only if
only —embed specified, if both —embed and
—listen then wait on any channel.
This commit is contained in:
George Harker
2023-10-31 20:04:53 -07:00
committed by GitHub
parent 746a153bc1
commit 4e6096a67f
4 changed files with 82 additions and 11 deletions

View File

@@ -392,9 +392,10 @@ int main(int argc, char **argv)
// Wait for UIs to set up Nvim or show early messages
// and prompts (--cmd, swapfile dialog, …).
bool use_remote_ui = (embedded_mode && !headless_mode);
bool listen_and_embed = params.listen_addr != NULL;
if (use_remote_ui) {
TIME_MSG("waiting for UI");
remote_ui_wait_for_attach();
remote_ui_wait_for_attach(!listen_and_embed);
TIME_MSG("done waiting for UI");
firstwin->w_prev_height = firstwin->w_height; // may have changed
}