mirror of
https://github.com/tmux/tmux.git
synced 2025-09-03 22:43:58 +00:00
- 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.
This commit is contained in:
9
status.c
9
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);
|
||||
|
Reference in New Issue
Block a user