From 80af85a102bcb4c91d6ce08102131a4654212d80 Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Tue, 19 May 2009 13:32:55 +0000 Subject: - 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. --- status.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'status.c') 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 @@ -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); -- cgit v1.2.3