mirror of
https://github.com/tmate-io/tmate-ssh-server.git
synced 2020-11-18 19:53:51 -08:00
Fix a crash: if remain-on-exit is set and the pane has exited, the
buffers may not be valid, so do not try to disable/enable them when switching to copy mode.
This commit is contained in:
parent
2b80ede963
commit
a97b7ad11c
@ -171,6 +171,7 @@ window_copy_init(struct window_pane *wp)
|
|||||||
data->searchstr = NULL;
|
data->searchstr = NULL;
|
||||||
|
|
||||||
wp->flags |= PANE_FREEZE;
|
wp->flags |= PANE_FREEZE;
|
||||||
|
if (wp->fd != -1)
|
||||||
bufferevent_disable(wp->event, EV_READ|EV_WRITE);
|
bufferevent_disable(wp->event, EV_READ|EV_WRITE);
|
||||||
|
|
||||||
data->jumptype = WINDOW_COPY_OFF;
|
data->jumptype = WINDOW_COPY_OFF;
|
||||||
@ -234,6 +235,7 @@ window_copy_free(struct window_pane *wp)
|
|||||||
struct window_copy_mode_data *data = wp->modedata;
|
struct window_copy_mode_data *data = wp->modedata;
|
||||||
|
|
||||||
wp->flags &= ~PANE_FREEZE;
|
wp->flags &= ~PANE_FREEZE;
|
||||||
|
if (wp->fd != -1)
|
||||||
bufferevent_enable(wp->event, EV_READ|EV_WRITE);
|
bufferevent_enable(wp->event, EV_READ|EV_WRITE);
|
||||||
|
|
||||||
if (data->searchstr != NULL)
|
if (data->searchstr != NULL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user