mirror of
https://github.com/tmux/tmux.git
synced 2025-09-06 17:07:00 +00:00
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.
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user