diff options
author | George Harker <george@george-graphics.co.uk> | 2023-10-31 20:04:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-01 11:04:53 +0800 |
commit | 4e6096a67fe9860994be38bcd155e7c47313205e (patch) | |
tree | a4f7ee6792bc27789bd6c052e3d26f2ae51eba72 /src/nvim/main.c | |
parent | 746a153bc1a1bc1433a1246fcf454eeb058b9de1 (diff) | |
download | rneovim-4e6096a67fe9860994be38bcd155e7c47313205e.tar.gz rneovim-4e6096a67fe9860994be38bcd155e7c47313205e.tar.bz2 rneovim-4e6096a67fe9860994be38bcd155e7c47313205e.zip |
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.
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r-- | src/nvim/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c index f6fd3abaec..c57f0e187a 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -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 } |