From 8f40796f05f2db0ff8b2c9231054b62b511a7ba0 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 5 Jun 2019 20:00:53 +0000 Subject: Add a -v flag to source-file to show the commands and line numbers. --- cfg.c | 1 + 1 file changed, 1 insertion(+) (limited to 'cfg.c') diff --git a/cfg.c b/cfg.c index d6435980..c79150de 100644 --- a/cfg.c +++ b/cfg.c @@ -127,6 +127,7 @@ load_cfg(const char *path, struct client *c, struct cmdq_item *item, int flags, pi.flags = flags; pi.file = path; pi.line = 1; + pi.item = item; pr = cmd_parse_from_file(f, &pi); fclose(f); -- cgit From 9272fe36e2e36789342337d81914008826499941 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 18 Jun 2019 11:08:42 +0000 Subject: Add a cmdq_continue function rather than twiddling the flag directly. --- cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cfg.c') diff --git a/cfg.c b/cfg.c index c79150de..286ed460 100644 --- a/cfg.c +++ b/cfg.c @@ -53,7 +53,7 @@ cfg_done(__unused struct cmdq_item *item, __unused void *data) cfg_show_causes(RB_MIN(sessions, &sessions)); if (cfg_item != NULL) - cfg_item->flags &= ~CMDQ_WAITING; + cmdq_continue(cfg_item); status_prompt_load_history(); -- cgit From ae541287d303fb253b3cd75341c318dcc6a8db4a Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 20 Jun 2019 06:51:36 +0000 Subject: Expand command formats in %if and move the config file loading later (to when the first client has identified) so all the client formats are available, fixes problems reported by Thomas Sattler. --- cfg.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cfg.c') diff --git a/cfg.c b/cfg.c index 286ed460..a47621a4 100644 --- a/cfg.c +++ b/cfg.c @@ -91,14 +91,14 @@ start_cfg(void) } if (cfg_file == NULL) - load_cfg(TMUX_CONF, NULL, NULL, CMD_PARSE_QUIET, NULL); + load_cfg(TMUX_CONF, c, NULL, CMD_PARSE_QUIET, NULL); if (cfg_file == NULL && (home = find_home()) != NULL) { xasprintf(&cfg_file, "%s/.tmux.conf", home); flags = CMD_PARSE_QUIET; } if (cfg_file != NULL) - load_cfg(cfg_file, NULL, NULL, flags, NULL); + load_cfg(cfg_file, c, NULL, flags, NULL); cmdq_append(NULL, cmdq_get_callback(cfg_done, NULL)); } @@ -128,6 +128,7 @@ load_cfg(const char *path, struct client *c, struct cmdq_item *item, int flags, pi.file = path; pi.line = 1; pi.item = item; + pi.c = c; pr = cmd_parse_from_file(f, &pi); fclose(f); @@ -147,7 +148,7 @@ load_cfg(const char *path, struct client *c, struct cmdq_item *item, int flags, if (item != NULL) cmdq_insert_after(item, new_item0); else - cmdq_append(c, new_item0); + cmdq_append(NULL, new_item0); cmd_list_free(pr->cmdlist); if (new_item != NULL) -- cgit