summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2010-08-25 19:19:44 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2010-08-25 19:19:44 +0000
commita8f9b4670f8e20377f6f36914e15777e181b6cf5 (patch)
tree5f6df1b2f57edd3eac0adaf3071d6ebae63dcb01 /usr.bin/tmux
parent689381fef9d16a17d8a82f43b8c1ec68bd3d8754 (diff)
When destroying a pane, reset any mode (which reenables pane
bufferevent) before freeing the bufferevent.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/window.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c
index d6246380c5c..a7549d086de 100644
--- a/usr.bin/tmux/window.c
+++ b/usr.bin/tmux/window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: window.c,v 1.54 2010/08/19 18:29:01 nicm Exp $ */
+/* $OpenBSD: window.c,v 1.55 2010/08/25 19:19:43 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -495,6 +495,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);
@@ -502,7 +504,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);