mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Add an option to alert (monitor) for silence (lack of activity) in a
window. From Thomas Adam.
This commit is contained in:
8
window.c
8
window.c
@ -639,6 +639,14 @@ window_pane_read_callback(unused struct bufferevent *bufev, void *data)
|
||||
input_parse(wp);
|
||||
|
||||
wp->pipe_off = EVBUFFER_LENGTH(wp->event->input);
|
||||
|
||||
/*
|
||||
* If we get here, we're not outputting anymore, so set the silence
|
||||
* flag on the window.
|
||||
*/
|
||||
wp->window->flags |= WINDOW_SILENCE;
|
||||
if (gettimeofday(&wp->window->silence_timer, NULL) != 0)
|
||||
fatal("gettimeofday failed.");
|
||||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
|
Reference in New Issue
Block a user