Fix some test failures.

This commit is contained in:
Nicholas Marriott
2026-07-09 11:19:29 +01:00
parent 6d7b811212
commit f22d8dc7e1
2 changed files with 7 additions and 2 deletions

View File

@@ -151,6 +151,7 @@ cmd_break_pane_exec(struct cmd *self, struct cmdq_item *item)
layout_close_pane(wp);
w = wp->window = window_create(w->sx, w->sy, w->xpixel, w->ypixel);
window_add_ref(w, __func__);
options_set_parent(wp->options, w->options);
wp->flags |= (PANE_STYLECHANGED|PANE_THEMECHANGED);
TAILQ_INSERT_HEAD(&w->panes, wp, entry);
@@ -173,6 +174,7 @@ cmd_break_pane_exec(struct cmd *self, struct cmdq_item *item)
if (idx == -1)
idx = -1 - options_get_number(dst_s->options, "base-index");
wl = session_attach(dst_s, w, idx, &cause); /* can't fail */
window_remove_ref(w, __func__);
if (!args_has(args, 'd')) {
session_select(dst_s, wl->idx);
cmd_find_from_session(current, dst_s, 0);

View File

@@ -1308,9 +1308,9 @@ window_pane_destroy(struct window_pane *wp)
window_pane_wait_finish(wp);
spawn_editor_finish(wp);
window_pane_clear_prompt(wp);
RB_REMOVE(window_pane_tree, &all_window_panes, wp);
wp->flags |= PANE_DESTROYED;
window_pane_clear_prompt(wp);
window_pane_free_modes(wp);
screen_write_clear_dirty(wp);
@@ -1657,10 +1657,13 @@ window_pane_clear_prompt(struct window_pane *wp)
if (prompt != NULL) {
if (wpp != NULL)
type = wpp->type;
wp->prompt = NULL;
prompt_free(prompt);
wp->flags |= PANE_REDRAW;
window_fire_pane_prompt("pane-prompt-closed", wp, type);
if (~wp->flags & PANE_DESTROYED)
window_fire_pane_prompt("pane-prompt-closed", wp, type);
}
}