1
0
mirror of https://github.com/tmux/tmux.git synced 2025-04-23 21:08:48 +00:00

Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam 2020-06-25 12:01:17 +01:00
commit 04a1a84bb8

View File

@ -68,10 +68,8 @@ cmd_new_window_exec(struct cmd *self, struct cmdq_item *item)
before = args_has(args, 'b'); before = args_has(args, 'b');
if (args_has(args, 'a') || before) { if (args_has(args, 'a') || before) {
idx = winlink_shuffle_up(s, wl, before); idx = winlink_shuffle_up(s, wl, before);
if (idx == -1) { if (idx == -1)
cmdq_error(item, "couldn't get a window index"); idx = target->idx;
return (CMD_RETURN_ERROR);
}
} }
memset(&sc, 0, sizeof sc); memset(&sc, 0, sizeof sc);
@ -114,7 +112,7 @@ cmd_new_window_exec(struct cmd *self, struct cmdq_item *item)
if ((template = args_get(args, 'F')) == NULL) if ((template = args_get(args, 'F')) == NULL)
template = NEW_WINDOW_TEMPLATE; template = NEW_WINDOW_TEMPLATE;
cp = format_single(item, template, tc, s, new_wl, cp = format_single(item, template, tc, s, new_wl,
new_wl->window->active); new_wl->window->active);
cmdq_print(item, "%s", cp); cmdq_print(item, "%s", cp);
free(cp); free(cp);
} }