From a888ce9963053c790c6ee9bf64cc53d95f0f9c09 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 20 Jun 2022 07:59:37 +0000 Subject: Do not display configuration file errors in a pane when in control mode, instead report them with a %config-error notification. GitHub issue 3193. --- cmd-new-session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd-new-session.c') diff --git a/cmd-new-session.c b/cmd-new-session.c index cb9abfb3..b946f049 100644 --- a/cmd-new-session.c +++ b/cmd-new-session.c @@ -335,7 +335,7 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item) /* * If there are still configuration file errors to display, put the new - * session's current window into more mode and display them now. + * session's current window into view mode and display them now. */ if (cfg_finished) cfg_show_causes(s); -- cgit From 1afe22086fb85a596eb4a20f2e80cacfbbc2f1e5 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 6 Jul 2022 08:40:52 +0000 Subject: Show config errors on attach if they were not shown when the session was created. --- cmd-new-session.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'cmd-new-session.c') diff --git a/cmd-new-session.c b/cmd-new-session.c index b946f049..c90369bc 100644 --- a/cmd-new-session.c +++ b/cmd-new-session.c @@ -333,13 +333,6 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item) server_client_set_key_table(c, NULL); } - /* - * If there are still configuration file errors to display, put the new - * session's current window into view mode and display them now. - */ - if (cfg_finished) - cfg_show_causes(s); - /* Print if requested. */ if (args_has(args, 'P')) { if ((template = args_get(args, 'F')) == NULL) @@ -357,6 +350,9 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item) cmd_find_from_session(&fs, s, 0); cmdq_insert_hook(s, item, &fs, "after-new-session"); + if (cfg_finished) + cfg_show_causes(s); + if (sc.argv != NULL) cmd_free_argv(sc.argc, sc.argv); free(cwd); -- cgit