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.
This commit is contained in:
nicm
2016-11-16 00:24:03 +00:00
parent c34a79b152
commit e88b74350f
4 changed files with 31 additions and 19 deletions

View File

@ -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);