summaryrefslogtreecommitdiffstats
path: root/cmd-new-session.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2012-11-22 13:24:14 +0000
committerThomas Adam <thomas@xteddy.org>2012-11-22 13:24:14 +0000
commitc04aa9020782fe0a944db2adf5a03e9f52618bea (patch)
tree37c0578ed65f027e2cbd95671fb3a6ccab4ce547 /cmd-new-session.c
parente4679172e3f4307b14f0e1715dc33ca640dc038b (diff)
parent0679eb6a6d6bab129264784009e70333b34ca6a8 (diff)
Merge branch 'obsd-master'
Sync from OpenBSD. * obsd-master: Add halfpage commands to mode command string table (missed by accident), from Thomas Adam. Clarify some points about config files, notably that they are only read at server start. From Thomas Adam. Use a utility function for common code to show errors in config file, from Thomas Adam.
Diffstat (limited to 'cmd-new-session.c')
-rw-r--r--cmd-new-session.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/cmd-new-session.c b/cmd-new-session.c
index 8477d9b2..93cf945a 100644
--- a/cmd-new-session.c
+++ b/cmd-new-session.c
@@ -58,14 +58,13 @@ cmd_new_session_exec(struct cmd *self, struct cmd_ctx *ctx)
struct args *args = self->args;
struct session *s, *old_s, *groupwith;
struct window *w;
- struct window_pane *wp;
struct environ env;
struct termios tio, *tiop;
struct passwd *pw;
const char *newname, *target, *update, *cwd, *errstr;
char *cmd, *cause;
int detached, idx;
- u_int sx, sy, i;
+ u_int sx, sy;
newname = args_get(args, 's');
if (newname != NULL) {
@@ -257,17 +256,8 @@ cmd_new_session_exec(struct cmd *self, struct cmd_ctx *ctx)
* If there are still configuration file errors to display, put the new
* session's current window into more mode and display them now.
*/
- if (cfg_finished && !ARRAY_EMPTY(&cfg_causes)) {
- wp = s->curw->window->active;
- window_pane_set_mode(wp, &window_copy_mode);
- window_copy_init_for_output(wp);
- for (i = 0; i < ARRAY_LENGTH(&cfg_causes); i++) {
- cause = ARRAY_ITEM(&cfg_causes, i);
- window_copy_add(wp, "%s", cause);
- free(cause);
- }
- ARRAY_FREE(&cfg_causes);
- }
+ if (cfg_finished)
+ show_cfg_causes(s);
return (detached ? CMD_RETURN_NORMAL : CMD_RETURN_ATTACH);
}