diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-10-11 23:55:26 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-10-11 23:55:26 +0000 |
commit | bc236109fd8b858f1bfd7e4b9c5d5e493bdd1563 (patch) | |
tree | e9f9eab7bc648d160904421f6e7f756b4efef557 /cmd-display-message.c | |
parent | 07ad6da7e826db31f3de174c0036f0e0400f9207 (diff) |
Sync OpenBSD patchset 374:
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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd-display-message.c b/cmd-display-message.c index dd37f6bd..a7a50868 100644 --- a/cmd-display-message.c +++ b/cmd-display-message.c @@ -1,4 +1,4 @@ -/* $Id: cmd-display-message.c,v 1.2 2009-07-28 22:12:16 tcunha Exp $ */ +/* $Id: cmd-display-message.c,v 1.3 2009-10-11 23:55:26 tcunha Exp $ */ /* * Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org> @@ -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); |