aboutsummaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'window.c')
-rw-r--r--window.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/window.c b/window.c
index 3823158a..e290d8be 100644
--- a/window.c
+++ b/window.c
@@ -1,4 +1,4 @@
-/* $Id: window.c,v 1.92 2009-07-15 17:43:21 nicm Exp $ */
+/* $Id: window.c,v 1.93 2009-07-15 17:45:09 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -80,6 +80,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;