version 1.207, 2017/11/09 23:02:13 |
version 1.208, 2018/03/16 15:15:39 |
|
|
struct window_pane *wp; |
struct window_pane *wp; |
|
|
w = window_create(sx, sy); |
w = window_create(sx, sy); |
wp = window_add_pane(w, NULL, 0, hlimit); |
wp = window_add_pane(w, NULL, 0, 0, hlimit); |
layout_init(w, wp); |
layout_init(w, wp); |
|
|
if (window_pane_spawn(wp, argc, argv, path, shell, cwd, |
if (window_pane_spawn(wp, argc, argv, path, shell, cwd, |
|
|
|
|
struct window_pane * |
struct window_pane * |
window_add_pane(struct window *w, struct window_pane *other, int before, |
window_add_pane(struct window *w, struct window_pane *other, int before, |
u_int hlimit) |
int full_size, u_int hlimit) |
{ |
{ |
struct window_pane *wp; |
struct window_pane *wp; |
|
|
|
|
TAILQ_INSERT_HEAD(&w->panes, wp, entry); |
TAILQ_INSERT_HEAD(&w->panes, wp, entry); |
} else if (before) { |
} else if (before) { |
log_debug("%s: @%u before %%%u", __func__, w->id, wp->id); |
log_debug("%s: @%u before %%%u", __func__, w->id, wp->id); |
TAILQ_INSERT_BEFORE(other, wp, entry); |
if (full_size) |
|
TAILQ_INSERT_HEAD(&w->panes, wp, entry); |
|
else |
|
TAILQ_INSERT_BEFORE(other, wp, entry); |
} else { |
} else { |
log_debug("%s: @%u after %%%u", __func__, w->id, wp->id); |
log_debug("%s: @%u after %%%u", __func__, w->id, wp->id); |
TAILQ_INSERT_AFTER(&w->panes, other, wp, entry); |
if (full_size) |
|
TAILQ_INSERT_TAIL(&w->panes, wp, entry); |
|
else |
|
TAILQ_INSERT_AFTER(&w->panes, other, wp, entry); |
} |
} |
return (wp); |
return (wp); |
} |
} |