aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ui_client.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2025-02-09 22:04:33 +0100
committerJustin M. Keyes <justinkz@gmail.com>2025-02-10 18:56:11 +0100
commit4b0e2605eaf90268195029a29f10903dc82729e7 (patch)
tree76f735084431f5027cdfc90da43370af0f2d2477 /src/nvim/ui_client.c
parentad60b3fb4806c0917010bbe97876c22fb57cabcd (diff)
downloadrneovim-4b0e2605eaf90268195029a29f10903dc82729e7.tar.gz
rneovim-4b0e2605eaf90268195029a29f10903dc82729e7.tar.bz2
rneovim-4b0e2605eaf90268195029a29f10903dc82729e7.zip
feat(ui): UI :detach command
Problem: Cannot detach the current UI. Solution: - Introduce `:detach`. - Introduce `Channel.detach`. Co-authored-by: bfredl <bjorn.linse@gmail.com>
Diffstat (limited to 'src/nvim/ui_client.c')
-rw-r--r--src/nvim/ui_client.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/ui_client.c b/src/nvim/ui_client.c
index af946d799a..d42c0a7fdd 100644
--- a/src/nvim/ui_client.c
+++ b/src/nvim/ui_client.c
@@ -61,9 +61,14 @@ uint64_t ui_client_start_server(int argc, char **argv)
CallbackReader on_err = CALLBACK_READER_INIT;
on_err.fwd_err = true;
+#ifdef MSWIN
+ bool detach = false; // TODO(justinmk): detach=true breaks `tt.setup_child_nvim` tests on Windows.
+#else
+ bool detach = true;
+#endif
Channel *channel = channel_job_start(args, get_vim_var_str(VV_PROGPATH),
CALLBACK_READER_INIT, on_err, CALLBACK_NONE,
- false, true, true, false, kChannelStdinPipe,
+ false, true, true, detach, kChannelStdinPipe,
NULL, 0, 0, NULL, &exit_status);
if (!channel) {
return 0;