diff options
author | nicm <nicm> | 2021-08-12 08:05:11 +0000 |
---|---|---|
committer | nicm <nicm> | 2021-08-12 08:05:11 +0000 |
commit | 163908fe8a0af8cf2d24510415bd4f81ace3a4d1 (patch) | |
tree | 0ec5a7b224bde8202977798b49d7dc2ee6ff0a7b /cmd-queue.c | |
parent | 7eea3d7ab850bb8fbeeccbb4b0fe84b9274965af (diff) |
Move hook format setup earlier and add a hook_client, GitHub issue 2809.
Diffstat (limited to 'cmd-queue.c')
-rw-r--r-- | cmd-queue.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cmd-queue.c b/cmd-queue.c index 54163919..6dd5f9dd 100644 --- a/cmd-queue.c +++ b/cmd-queue.c @@ -269,6 +269,15 @@ cmdq_add_format(struct cmdq_state *state, const char *key, const char *fmt, ...) free(value); } +/* Add formats to command queue. */ +void +cmdq_add_formats(struct cmdq_state *state, struct format_tree *ft) +{ + if (state->formats == NULL) + state->formats = format_create(NULL, NULL, FORMAT_NONE, 0); + format_merge(state->formats, ft); +} + /* Merge formats from item. */ void cmdq_merge_formats(struct cmdq_item *item, struct format_tree *ft) |