summaryrefslogtreecommitdiffstats
path: root/cmd-find.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2017-04-21 16:01:18 +0100
committerThomas Adam <thomas@xteddy.org>2017-04-21 16:01:18 +0100
commit4612419c143c3f748bc5f6ccd467c7c0014e8d48 (patch)
tree42929aeeb8b1d89abf639124412199fac7092f04 /cmd-find.c
parent93062ad09952f411d48818b05dc9898bc14dcfde (diff)
parentc799425069d02675474cda312fac1457829052fb (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-find.c')
-rw-r--r--cmd-find.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/cmd-find.c b/cmd-find.c
index 35b3fcb6..1261156d 100644
--- a/cmd-find.c
+++ b/cmd-find.c
@@ -894,12 +894,11 @@ cmd_find_from_session(struct cmd_find_state *fs, struct session *s)
/* Find state from a winlink. */
int
-cmd_find_from_winlink(struct cmd_find_state *fs, struct session *s,
- struct winlink *wl)
+cmd_find_from_winlink(struct cmd_find_state *fs, struct winlink *wl)
{
cmd_find_clear_state(fs, NULL, 0);
- fs->s = s;
+ fs->s = wl->session;
fs->wl = wl;
fs->w = wl->window;
fs->wp = wl->window->active;
@@ -997,8 +996,8 @@ cmd_find_target(struct cmd_find_state *fs, struct cmd_find_state *current,
if (server_check_marked() && (flags & CMD_FIND_DEFAULT_MARKED)) {
fs->current = &marked_pane;
log_debug("%s: current is marked pane", __func__);
- } else if (cmd_find_valid_state(&item->current)) {
- fs->current = &item->current;
+ } else if (cmd_find_valid_state(&item->shared->current)) {
+ fs->current = &item->shared->current;
log_debug("%s: current is from queue", __func__);
} else {
fs->current = current;
@@ -1014,7 +1013,7 @@ cmd_find_target(struct cmd_find_state *fs, struct cmd_find_state *current,
/* Mouse target is a plain = or {mouse}. */
if (strcmp(target, "=") == 0 || strcmp(target, "{mouse}") == 0) {
- m = &item->mouse;
+ m = &item->shared->mouse;
switch (type) {
case CMD_FIND_PANE:
fs->wp = cmd_mouse_pane(m, &fs->s, &fs->wl);