diff options
author | nicm <nicm> | 2019-03-18 09:46:42 +0000 |
---|---|---|
committer | nicm <nicm> | 2019-03-18 09:46:42 +0000 |
commit | d2d43987d0f35af2bc012f1260fdb81c851fe390 (patch) | |
tree | df9319c2fa30d1c044b924d497872f070fd14d10 | |
parent | bd3332b21137ca7c1bd57b26df9482e72b0e909c (diff) | |
download | rtmux-d2d43987d0f35af2bc012f1260fdb81c851fe390.tar.gz rtmux-d2d43987d0f35af2bc012f1260fdb81c851fe390.tar.bz2 rtmux-d2d43987d0f35af2bc012f1260fdb81c851fe390.zip |
With force, kill previous job before starting new. Fixes problem
reported by Scott Mcdermott in GitHub issue 1627.
-rw-r--r-- | format.c | 4 | ||||
-rw-r--r-- | status.c | 2 |
2 files changed, 4 insertions, 2 deletions
@@ -346,7 +346,9 @@ format_job_get(struct format_tree *ft, const char *cmd) force = (ft->flags & FORMAT_FORCE); t = time(NULL); - if (fj->job == NULL && (force || fj->last != t)) { + if (force && fj->job != NULL) + job_free(fj->job); + if (force || (fj->job == NULL && fj->last != t)) { fj->job = job_run(expanded, NULL, server_client_get_cwd(ft->client, NULL), format_job_update, format_job_complete, NULL, fj, JOB_NOWAIT); @@ -704,7 +704,7 @@ status_message_redraw(struct client *c) lines = status_line_size(c); if (lines <= 1) lines = 1; - screen_init(sl->active, c->tty.sx, 1, 0); + screen_init(sl->active, c->tty.sx, lines, 0); len = screen_write_strlen("%s", c->message_string); if (len > c->tty.sx) |