=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/window-copy.c,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- src/usr.bin/tmux/window-copy.c 2010/02/17 21:27:18 1.45 +++ src/usr.bin/tmux/window-copy.c 2010/02/19 00:03:21 1.46 @@ -1,4 +1,4 @@ -/* $OpenBSD: window-copy.c,v 1.45 2010/02/17 21:27:18 nicm Exp $ */ +/* $OpenBSD: window-copy.c,v 1.46 2010/02/19 00:03:21 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -138,6 +138,9 @@ data->searchtype = WINDOW_COPY_OFF; data->searchstr = NULL; + wp->flags |= PANE_FREEZE; + bufferevent_disable(wp->event, EV_READ|EV_WRITE); + s = &data->screen; screen_init(s, screen_size_x(&wp->base), screen_size_y(&wp->base), 0); if (options_get_number(&wp->window->options, "mode-mouse")) @@ -165,6 +168,9 @@ window_copy_free(struct window_pane *wp) { struct window_copy_mode_data *data = wp->modedata; + + wp->flags &= ~PANE_FREEZE; + bufferevent_enable(wp->event, EV_READ|EV_WRITE); if (data->searchstr != NULL) xfree(data->searchstr);