From 7b0123dd6a06a032516cce66d82c064b1d942013 Mon Sep 17 00:00:00 2001 From: shafouz <38974831+shafouz@users.noreply.github.com> Date: Sun, 13 Aug 2023 02:14:08 -0400 Subject: feat(remote): avoid --remote-ui infinite loop (#24465) --- src/nvim/main.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/nvim/main.c b/src/nvim/main.c index 377b804661..d9ca82784f 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -921,6 +921,11 @@ static void remote_request(mparm_T *params, int remote_args, char *server_addr, os_errmsg(connect_error); os_errmsg("\n"); os_exit(1); + } else if (strequal(server_addr, os_getenv("NVIM"))) { + os_errmsg("Cannot attach UI of :terminal child to its parent. "); + os_errmsg("(Unset $NVIM to skip this check)"); + os_errmsg("\n"); + os_exit(1); } ui_client_channel_id = chan; -- cgit