mirror of
https://github.com/tmux/tmux.git
synced 2025-01-06 07:48:48 +00:00
Give #() commands a one second grace period where the output is empty
before telling the user they aren't doing anything. GitHub issue 2774.
This commit is contained in:
parent
df3fe2aa72
commit
38c5788232
8
format.c
8
format.c
@ -371,9 +371,6 @@ format_job_get(struct format_expand_state *es, const char *cmd)
|
||||
fj->client = ft->client;
|
||||
fj->tag = ft->tag;
|
||||
fj->cmd = xstrdup(cmd);
|
||||
fj->expanded = NULL;
|
||||
|
||||
xasprintf(&fj->out, "<'%s' not ready>", fj->cmd);
|
||||
|
||||
RB_INSERT(format_job_tree, jobs, fj);
|
||||
}
|
||||
@ -402,11 +399,14 @@ format_job_get(struct format_expand_state *es, const char *cmd)
|
||||
}
|
||||
fj->last = t;
|
||||
fj->updated = 0;
|
||||
}
|
||||
} else if (fj->job != NULL && (t - fj->last) > 1 && fj->out == NULL)
|
||||
xasprintf(&fj->out, "<'%s' not ready>", fj->cmd);
|
||||
free(expanded);
|
||||
|
||||
if (ft->flags & FORMAT_STATUS)
|
||||
fj->status = 1;
|
||||
if (fj->out == NULL)
|
||||
return (xstrdup(""));
|
||||
return (format_expand1(&next, fj->out));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user