diff --git a/window.c b/window.c index b532af5d..a414b8c0 100644 --- a/window.c +++ b/window.c @@ -1,4 +1,4 @@ -/* $Id: window.c,v 1.135 2010-08-29 14:42:11 tcunha Exp $ */ +/* $Id: window.c,v 1.136 2010-08-29 14:46:13 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -493,6 +493,8 @@ window_pane_create(struct window *w, u_int sx, u_int sy, u_int hlimit) void window_pane_destroy(struct window_pane *wp) { + window_pane_reset_mode(wp); + if (wp->fd != -1) { close(wp->fd); bufferevent_free(wp->event); @@ -500,7 +502,6 @@ window_pane_destroy(struct window_pane *wp) input_free(wp); - window_pane_reset_mode(wp); screen_free(&wp->base); if (wp->saved_grid != NULL) grid_destroy(wp->saved_grid);