aboutsummaryrefslogtreecommitdiff
path: root/cmd-new-session.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2012-11-22 16:48:50 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2012-11-22 16:48:50 +0000
commit63f451965cf26bf6baadc374bd0dcadc8ca66308 (patch)
treeac3b5f838273eed3271e04b4132fb22807705c42 /cmd-new-session.c
parent60808bbdede5c489a1faa6671999a92a67b28024 (diff)
parentc04aa9020782fe0a944db2adf5a03e9f52618bea (diff)
downloadrtmux-63f451965cf26bf6baadc374bd0dcadc8ca66308.tar.gz
rtmux-63f451965cf26bf6baadc374bd0dcadc8ca66308.tar.bz2
rtmux-63f451965cf26bf6baadc374bd0dcadc8ca66308.zip
Merge branch 'master' of ssh://tmux.git.sourceforge.net/gitroot/tmux/tmux
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);
}