From df7fbcd7a5a775586522380a70530721d1f2c151 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 5 Aug 2020 09:11:09 +0000 Subject: Change searching to behave more like emacs and so that regex searching doesn't overlap when searching forwards. --- server-client.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'server-client.c') diff --git a/server-client.c b/server-client.c index 3a79a5d1..4010019d 100644 --- a/server-client.c +++ b/server-client.c @@ -1662,8 +1662,6 @@ server_client_reset_state(struct client *c) s = wp->screen; if (s != NULL) mode = s->mode; - if (c->prompt_string != NULL || c->message_string != NULL) - mode &= ~MODE_CURSOR; log_debug("%s: client %s mode %x", __func__, c->name, mode); /* Reset region and margin. */ -- cgit From 86d6ac2f0695b02bdbef542cce3cdb0cca39160e Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 22 Sep 2020 05:23:34 +0000 Subject: Fix warnings on some platforms with %llx and add a new message to handle 64-bit client flags. --- server-client.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'server-client.c') diff --git a/server-client.c b/server-client.c index 4010019d..efeec85b 100644 --- a/server-client.c +++ b/server-client.c @@ -1985,6 +1985,7 @@ server_client_dispatch(struct imsg *imsg, void *arg) switch (imsg->hdr.type) { case MSG_IDENTIFY_FEATURES: case MSG_IDENTIFY_FLAGS: + case MSG_IDENTIFY_LONGFLAGS: case MSG_IDENTIFY_TERM: case MSG_IDENTIFY_TTYNAME: case MSG_IDENTIFY_CWD: @@ -2143,6 +2144,7 @@ server_client_dispatch_identify(struct client *c, struct imsg *imsg) const char *data, *home; size_t datalen; int flags, feat; + uint64_t longflags; char *name; if (c->flags & CLIENT_IDENTIFIED) @@ -2167,6 +2169,14 @@ server_client_dispatch_identify(struct client *c, struct imsg *imsg) c->flags |= flags; log_debug("client %p IDENTIFY_FLAGS %#x", c, flags); break; + case MSG_IDENTIFY_LONGFLAGS: + if (datalen != sizeof longflags) + fatalx("bad MSG_IDENTIFY_LONGFLAGS size"); + memcpy(&longflags, data, sizeof longflags); + c->flags |= longflags; + log_debug("client %p IDENTIFY_LONGFLAGS %#llx", c, + (unsigned long long)longflags); + break; case MSG_IDENTIFY_TERM: if (datalen == 0 || data[datalen - 1] != '\0') fatalx("bad MSG_IDENTIFY_TERM string"); -- cgit From b33a302235affc19d8a1d8f7473fe589d1bcd17e Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 28 Oct 2020 10:09:10 +0000 Subject: Do not require that there be no other clients before loading the config, being the first client is enough. GitHub issue 2438. --- server-client.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'server-client.c') diff --git a/server-client.c b/server-client.c index efeec85b..4c9706f7 100644 --- a/server-client.c +++ b/server-client.c @@ -2243,7 +2243,7 @@ server_client_dispatch_identify(struct client *c, struct imsg *imsg) c->name = name; log_debug("client %p name is %s", c, c->name); - if (c->flags & CLIENT_CONTROL) + if (c->flags & CLIENT_CONTROL) control_start(c); else if (c->fd != -1) { if (tty_init(&c->tty, c) != 0) { @@ -2258,13 +2258,13 @@ server_client_dispatch_identify(struct client *c, struct imsg *imsg) } /* - * If this is the first client that has finished identifying, load - * configuration files. + * If this is the first client, load configuration files. Any later + * clients are allowed to continue with their command even if the + * config has not been loaded - they might have been run from inside it */ if ((~c->flags & CLIENT_EXIT) && - !cfg_finished && - c == TAILQ_FIRST(&clients) && - TAILQ_NEXT(c, entry) == NULL) + !cfg_finished && + c == TAILQ_FIRST(&clients)) start_cfg(); } -- cgit From 649e5970e98b0073763f42a25dcab02aadea688f Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 30 Oct 2020 08:55:56 +0000 Subject: Add a -O flag to display-menu to change the mouse behaviour and not close the menu when the mouse is released, from teo_paul1 at yahoo dot com. --- server-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server-client.c') diff --git a/server-client.c b/server-client.c index 4c9706f7..3c2b54d5 100644 --- a/server-client.c +++ b/server-client.c @@ -1693,8 +1693,8 @@ server_client_reset_state(struct client *c) * mode. */ if (options_get_number(oo, "mouse")) { - mode &= ~ALL_MOUSE_MODES; if (c->overlay_draw == NULL) { + mode &= ~ALL_MOUSE_MODES; TAILQ_FOREACH(loop, &w->panes, entry) { if (loop->screen->mode & MODE_MOUSE_ALL) mode |= MODE_MOUSE_ALL; -- cgit From 910457f68dfc04c491f31d773788c61300f3f8c7 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 30 Oct 2020 09:00:07 +0000 Subject: There is no reason not to fire focus events when a pane is in a mode, GitHub issue 2372. --- server-client.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'server-client.c') diff --git a/server-client.c b/server-client.c index 3c2b54d5..190897ff 100644 --- a/server-client.c +++ b/server-client.c @@ -1590,10 +1590,6 @@ server_client_check_pane_focus(struct window_pane *wp) if (wp->window->active != wp) goto not_focused; - /* If we're in a mode, we're not focused. */ - if (wp->screen != &wp->base) - goto not_focused; - /* * If our window is the current window in any focused clients with an * attached session, we're focused. -- cgit From 95841ba16acafa8c1a516712ad0f2b48e34357e6 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 30 Oct 2020 18:54:23 +0000 Subject: With csh, a tmux client gets SIGTERM before SIGCONT when killed with "kill %%", so when the client tells the server it got SIGCONT, don't use bits that may already have been freed when it got SIGTERM. Also don't print anything on exit if we get SIGTERM while suspended. Reported by Theo. --- server-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server-client.c') diff --git a/server-client.c b/server-client.c index 190897ff..3e256a92 100644 --- a/server-client.c +++ b/server-client.c @@ -2025,7 +2025,7 @@ server_client_dispatch(struct imsg *imsg, void *arg) break; c->flags &= ~CLIENT_SUSPENDED; - if (c->fd == -1) /* exited in the meantime */ + if (c->fd == -1 || c->session == NULL) /* exited already */ break; s = c->session; -- cgit