summaryrefslogtreecommitdiffstats
path: root/cmd-find-window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-05-04 17:58:27 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-05-04 17:58:27 +0000
commit143aa718e5958b9c7b539657d02c476a43270dad (patch)
tree5db9cc3eaf136cd3cd81ec8f5c5e9862e7c73fc7 /cmd-find-window.c
parent59a57285278de78d0a69b89fe7851a56bad4240a (diff)
Space trimmage mega-diff.
Diffstat (limited to 'cmd-find-window.c')
-rw-r--r--cmd-find-window.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/cmd-find-window.c b/cmd-find-window.c
index a597582a..a3a4a51b 100644
--- a/cmd-find-window.c
+++ b/cmd-find-window.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-find-window.c,v 1.6 2009-03-29 11:18:28 nicm Exp $ */
+/* $Id: cmd-find-window.c,v 1.7 2009-05-04 17:58:26 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -70,7 +70,7 @@ cmd_find_window_exec(struct cmd *self, struct cmd_ctx *ctx)
if ((wl = cmd_find_window(ctx, data->target, NULL)) == NULL)
return (-1);
-
+
ARRAY_INIT(&list_idx);
ARRAY_INIT(&list_ctx);
@@ -86,7 +86,7 @@ cmd_find_window_exec(struct cmd *self, struct cmd_ctx *ctx)
if (sres == NULL &&
strstr(wp->base.title, data->arg) == NULL)
continue;
-
+
if (sres == NULL) {
xasprintf(&sctx,
"pane %u title: \"%s\"", i - 1,
@@ -96,9 +96,9 @@ cmd_find_window_exec(struct cmd *self, struct cmd_ctx *ctx)
xfree(sres);
}
}
-
+
ARRAY_ADD(&list_idx, wm->idx);
- ARRAY_ADD(&list_ctx, sctx);
+ ARRAY_ADD(&list_ctx, sctx);
}
}
@@ -123,7 +123,7 @@ cmd_find_window_exec(struct cmd *self, struct cmd_ctx *ctx)
wm = winlink_find_by_index(
&s->windows, ARRAY_ITEM(&list_idx, i));
w = wm->window;
-
+
sctx = ARRAY_ITEM(&list_ctx, i);
window_choose_add(wl->window->active,
wm->idx, "%3d: %s [%ux%u] (%u panes) %s", wm->idx, w->name,
@@ -170,7 +170,7 @@ cmd_find_window_search(struct window_pane *wp, const char *searchstr)
u_int i, j, k;
buf = xmalloc(1);
-
+
for (j = 0; j < screen_size_y(&wp->base); j++) {
off = 0;
for (i = 0; i < screen_size_x(&wp->base); i++) {
@@ -191,7 +191,7 @@ cmd_find_window_search(struct window_pane *wp, const char *searchstr)
while (off > 0 && buf[off - 1] == ' ')
off--;
buf[off] = '\0';
-
+
if ((s = strstr(buf, searchstr)) != NULL) {
s = section_string(buf, off, s - buf, 40);
xfree(buf);