diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-10-10 15:03:01 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-10-10 15:03:01 +0000 |
commit | 6bca92db4ddd2d3d25671aa83e74dd11aca652a8 (patch) | |
tree | 459c5015680aa7adaf8ac6d2d8c6f20894d3c850 /cmd-display-message.c | |
parent | 4658c063d59bab42ccca8c2e58a50800b00b956f (diff) | |
download | rtmux-6bca92db4ddd2d3d25671aa83e74dd11aca652a8.tar.gz rtmux-6bca92db4ddd2d3d25671aa83e74dd11aca652a8.tar.bz2 rtmux-6bca92db4ddd2d3d25671aa83e74dd11aca652a8.zip |
Rather than running status-left, status-right and window title #() with popen
immediately every redraw, queue them up and run them in the background,
starting each once every status-interval. The actual status line uses the
output from the last run.
This brings several advantages:
- tmux itself may be called from inside #() without causing the server to hang;
- likewise, sleep or similar doesn't cause the server to block;
- commands aren't run excessively often when redrawing;
- commands shared by status-left and status-right, or used multiple times, will
only be run once.
run-shell and if-shell still use system()/popen() but will be changed over to
use this too later.
Diffstat (limited to 'cmd-display-message.c')
-rw-r--r-- | cmd-display-message.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd-display-message.c b/cmd-display-message.c index 20758daa..71421ea2 100644 --- a/cmd-display-message.c +++ b/cmd-display-message.c @@ -55,7 +55,7 @@ cmd_display_message_exec(struct cmd *self, struct cmd_ctx *ctx) else template = data->arg; - msg = status_replace(c->session, template, time(NULL)); + msg = status_replace(c, template, time(NULL)); status_message_set(c, "%s", msg); xfree(msg); |