mirror of
https://github.com/tmux/tmux.git
synced 2026-10-13 14:24:28 +00:00
Free modes rather than going through reset when pane is destroyed as the
reset path may try to destroy the pane again.
This commit is contained in:
17
window.c
17
window.c
@@ -1127,13 +1127,28 @@ window_pane_wait_finish(struct window_pane *wp)
|
|||||||
cmdq_continue(item);
|
cmdq_continue(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
window_pane_free_modes(struct window_pane *wp)
|
||||||
|
{
|
||||||
|
struct window_mode_entry *wme;
|
||||||
|
|
||||||
|
while (!TAILQ_EMPTY(&wp->modes)) {
|
||||||
|
wme = TAILQ_FIRST(&wp->modes);
|
||||||
|
TAILQ_REMOVE(&wp->modes, wme, entry);
|
||||||
|
wme->mode->free(wme);
|
||||||
|
free(wme);
|
||||||
|
}
|
||||||
|
|
||||||
|
wp->screen = &wp->base;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
window_pane_destroy(struct window_pane *wp)
|
window_pane_destroy(struct window_pane *wp)
|
||||||
{
|
{
|
||||||
window_pane_wait_finish(wp);
|
window_pane_wait_finish(wp);
|
||||||
spawn_editor_finish(wp);
|
spawn_editor_finish(wp);
|
||||||
|
|
||||||
window_pane_reset_mode_all(wp);
|
window_pane_free_modes(wp);
|
||||||
free(wp->searchstr);
|
free(wp->searchstr);
|
||||||
|
|
||||||
if (wp->fd != -1) {
|
if (wp->fd != -1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user