aboutsummaryrefslogtreecommitdiff
path: root/cmd-find.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2017-04-21 20:01:18 +0100
committerThomas Adam <thomas@xteddy.org>2017-04-21 20:01:18 +0100
commit1f209ed030f9879d873d10341171889af08ae070 (patch)
tree5729e3f2f1e423310eaf19a5fe3a54b5756533bb /cmd-find.c
parentc376c5a817973f176894c7ee11bb5675affb3be4 (diff)
parent3c876235cc2d0d36f961e1f026f9feaf5cd22b73 (diff)
downloadrtmux-1f209ed030f9879d873d10341171889af08ae070.tar.gz
rtmux-1f209ed030f9879d873d10341171889af08ae070.tar.bz2
rtmux-1f209ed030f9879d873d10341171889af08ae070.zip
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-find.c')
-rw-r--r--cmd-find.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/cmd-find.c b/cmd-find.c
index 1261156d..d21b3d7e 100644
--- a/cmd-find.c
+++ b/cmd-find.c
@@ -878,7 +878,7 @@ cmd_find_log_state(const char *prefix, struct cmd_find_state *fs)
}
/* Find state from a session. */
-int
+void
cmd_find_from_session(struct cmd_find_state *fs, struct session *s)
{
cmd_find_clear_state(fs, NULL, 0);
@@ -889,11 +889,10 @@ cmd_find_from_session(struct cmd_find_state *fs, struct session *s)
fs->wp = fs->w->active;
cmd_find_log_state(__func__, fs);
- return (0);
}
/* Find state from a winlink. */
-int
+void
cmd_find_from_winlink(struct cmd_find_state *fs, struct winlink *wl)
{
cmd_find_clear_state(fs, NULL, 0);
@@ -904,7 +903,6 @@ cmd_find_from_winlink(struct cmd_find_state *fs, struct winlink *wl)
fs->wp = wl->window->active;
cmd_find_log_state(__func__, fs);
- return (0);
}
/* Find state from a session and window. */
@@ -941,6 +939,22 @@ cmd_find_from_window(struct cmd_find_state *fs, struct window *w)
return (0);
}
+/* Find state from a winlink and pane. */
+void
+cmd_find_from_winlink_pane(struct cmd_find_state *fs, struct winlink *wl,
+ struct window_pane *wp)
+{
+ cmd_find_clear_state(fs, NULL, 0);
+
+ fs->s = wl->session;
+ fs->wl = wl;
+ fs->idx = fs->wl->idx;
+ fs->w = fs->wl->window;
+ fs->wp = wp;
+
+ cmd_find_log_state(__func__, fs);
+}
+
/* Find state from a pane. */
int
cmd_find_from_pane(struct cmd_find_state *fs, struct window_pane *wp)