diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-04-06 21:35:45 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-04-06 21:35:45 +0000 |
commit | 916ca4a507e705a47aa3dba40687b0ed2087d1b3 (patch) | |
tree | eb5c409793e3606f49eb6737286a9af92384ec90 /usr.bin/tmux/cmd-new-session.c | |
parent | d8564c66217ccb969e92abb42eb7867098deda69 (diff) |
Merge copy mode and output mode, dropping the latter. Idea and code from
Micah Cowan.
Diffstat (limited to 'usr.bin/tmux/cmd-new-session.c')
-rw-r--r-- | usr.bin/tmux/cmd-new-session.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-new-session.c b/usr.bin/tmux/cmd-new-session.c index 1b9ece82998..cae1afdd0c8 100644 --- a/usr.bin/tmux/cmd-new-session.c +++ b/usr.bin/tmux/cmd-new-session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-new-session.c,v 1.28 2010/02/22 20:19:16 nicm Exp $ */ +/* $OpenBSD: cmd-new-session.c,v 1.29 2010/04/06 21:35:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -287,10 +287,11 @@ cmd_new_session_exec(struct cmd *self, struct cmd_ctx *ctx) */ if (cfg_finished && !ARRAY_EMPTY(&cfg_causes)) { wp = s->curw->window->active; - window_pane_set_mode(wp, &window_more_mode); + 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_more_add(wp, "%s", cause); + window_copy_add(wp, "%s", cause); xfree(cause); } ARRAY_FREE(&cfg_causes); |