From 315f8009e693765f67eebf77913dfa96a9813835 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 16 Nov 2016 00:24:03 +0000 Subject: The target validity check used window_pane_visible but that may be false if the pane is zoomed, so instead add a new function to just check if the pane is actually on screen (most commands still want to accept panes invisible by zoom). Also reject panes outside the window for various special targets. Problem reported by Sean Haugh. --- usr.bin/tmux/cmd-select-pane.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'usr.bin/tmux/cmd-select-pane.c') diff --git a/usr.bin/tmux/cmd-select-pane.c b/usr.bin/tmux/cmd-select-pane.c index a126be48a46..9f28d401cfe 100644 --- a/usr.bin/tmux/cmd-select-pane.c +++ b/usr.bin/tmux/cmd-select-pane.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-select-pane.c,v 1.34 2016/10/16 19:04:05 nicm Exp $ */ +/* $OpenBSD: cmd-select-pane.c,v 1.35 2016/11/16 00:24:03 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -63,7 +63,6 @@ cmd_select_pane_exec(struct cmd *self, struct cmdq_item *item) const char *style; if (self->entry == &cmd_last_pane_entry || args_has(args, 'l')) { - if (wl->window->last == NULL) { cmdq_error(item, "no last pane"); return (CMD_RETURN_ERROR); -- cgit v1.2.3-59-g8ed1b