summaryrefslogtreecommitdiffstats
path: root/cmd-find.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2018-01-17 11:26:10 +0000
committerThomas Adam <thomas@xteddy.org>2018-01-17 11:26:10 +0000
commit84ddc72744d88f399103ea350c28d5fb45e28b96 (patch)
tree76a62ad185f8a274f4243a2365fd01801e421b8e /cmd-find.c
parent58e9d12f23be4ecc7ab6879e8d19239b430f6553 (diff)
parent75842bfe66d983580dddf11b676445d5b9fa9f8a (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-find.c')
-rw-r--r--cmd-find.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/cmd-find.c b/cmd-find.c
index 27d2a394..b0174182 100644
--- a/cmd-find.c
+++ b/cmd-find.c
@@ -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;