aboutsummaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'window.c')
-rw-r--r--window.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/window.c b/window.c
index 46a713df..7823d2f5 100644
--- a/window.c
+++ b/window.c
@@ -82,6 +82,19 @@ winlink_cmp(struct winlink *wl1, struct winlink *wl2)
}
struct winlink *
+winlink_find_by_window(struct winlinks *wwl, struct window *w)
+{
+ struct winlink *wl;
+
+ RB_FOREACH(wl, winlinks, wwl) {
+ if (wl->window == w)
+ return (wl);
+ }
+
+ return (NULL);
+}
+
+struct winlink *
winlink_find_by_index(struct winlinks *wwl, int idx)
{
struct winlink wl;