diff options
Diffstat (limited to 'cmd-find.c')
-rw-r--r-- | cmd-find.c | 18 |
1 files changed, 6 insertions, 12 deletions
@@ -587,8 +587,6 @@ cmd_find_get_pane_with_window(struct cmd_find_state *fs, const char *pane) /* Try special characters. */ if (strcmp(pane, "!") == 0) { - if (fs->w->last == NULL) - return (-1); fs->wp = fs->w->last; if (fs->wp == NULL) return (-1); @@ -912,16 +910,12 @@ cmd_find_from_client(struct cmd_find_state *fs, struct client *c, int flags) */ fs->w = wp->window; if (cmd_find_best_session_with_window(fs) != 0) { - if (wp != NULL) { - /* - * The window may have been destroyed but the pane - * still on all_window_panes due to something else - * holding a reference. - */ - goto unknown_pane; - } - cmd_find_clear_state(fs, 0); - return (-1); + /* + * The window may have been destroyed but the pane + * still on all_window_panes due to something else + * holding a reference. + */ + goto unknown_pane; } fs->wl = fs->s->curw; fs->w = fs->wl->window; |