summaryrefslogtreecommitdiffstats
path: root/status.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-05-19 13:32:55 +0000
committerTiago Cunha <tcunha@gmx.com>2009-05-19 13:32:55 +0000
commit80af85a102bcb4c91d6ce08102131a4654212d80 (patch)
treeb207ee59eea50f38dd6df496710a4897157dd748 /status.c
parenta385f757925110af9cc54c5d55298ede22e55e97 (diff)
- New window option monitor-content to search for a string in a window, and
highlight the status line if it matches. - To make this possible, the function cmd_find_window_search from cmd-find-window.c had to be moved to window.c and renamed window_pane_search. - While there use three new functions in server.c to check for bell, activity, and content, to avoid too much nesting.
Diffstat (limited to 'status.c')
-rw-r--r--status.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/status.c b/status.c
index c89c0f00..da1bf83d 100644
--- a/status.c
+++ b/status.c
@@ -1,4 +1,4 @@
-/* $Id: status.c,v 1.81 2009-05-17 18:15:40 nicm Exp $ */
+/* $Id: status.c,v 1.82 2009-05-19 13:32:55 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -184,6 +184,8 @@ draw:
larrow = -1;
else if (session_alert_has(s, wl, WINDOW_BELL))
larrow = -1;
+ else if (session_alert_has(s, wl, WINDOW_CONTENT))
+ larrow = -1;
}
for (ptr = text; *ptr != '\0'; ptr++) {
@@ -197,6 +199,8 @@ draw:
rarrow = -1;
else if (session_alert_has(s, wl, WINDOW_BELL))
rarrow = -1;
+ else if (session_alert_has(s, wl, WINDOW_CONTENT))
+ rarrow = -1;
}
if (offset < start + width) {
@@ -470,6 +474,9 @@ status_print(struct session *s, struct winlink *wl, struct grid_cell *gc)
} else if (session_alert_has(s, wl, WINDOW_BELL)) {
flag = '!';
gc->attr ^= GRID_ATTR_REVERSE;
+ } else if (session_alert_has(s, wl, WINDOW_CONTENT)) {
+ flag = '+';
+ gc->attr ^= GRID_ATTR_REVERSE;
}
xasprintf(&text, "%d:%s%c", wl->idx, wl->window->name, flag);