diff --git a/cmd-select-pane.c b/cmd-select-pane.c index 89c6fb20..92ecb734 100644 --- a/cmd-select-pane.c +++ b/cmd-select-pane.c @@ -66,7 +66,7 @@ cmd_select_pane_redraw(struct window *w) */ TAILQ_FOREACH(c, &clients, entry) { - if (c->session == NULL) + if (c->session == NULL || (c->flags & CLIENT_CONTROL)) continue; if (c->session->curw->window == w && tty_window_bigger(&c->tty)) server_redraw_client(c); diff --git a/window-tree.c b/window-tree.c index 4d73aeab..2aebc6ce 100644 --- a/window-tree.c +++ b/window-tree.c @@ -785,7 +785,8 @@ window_tree_search(__unused void *modedata, void *itemdata, const char *ss) struct session *s; struct winlink *wl; struct window_pane *wp; - const char *cmd; + char *cmd; + int retval; window_tree_pull_item(item, &s, &wl, &wp); @@ -806,7 +807,9 @@ window_tree_search(__unused void *modedata, void *itemdata, const char *ss) cmd = osdep_get_name(wp->fd, wp->tty); if (cmd == NULL || *cmd == '\0') return (0); - return (strstr(cmd, ss) != NULL); + retval = (strstr(cmd, ss) != NULL); + free(cmd); + return retval; } return (0); }