mirror of
https://github.com/tmux/tmux.git
synced 2026-05-30 14:16:18 +00:00
Discard queued data and clear offsets when turning pane off to prevent
later read of data that has been removed. From Aaron Campbell in GitHub issue 5054.
This commit is contained in:
@@ -356,6 +356,9 @@ control_set_pane_off(struct client *c, struct window_pane *wp)
|
|||||||
struct control_pane *cp;
|
struct control_pane *cp;
|
||||||
|
|
||||||
cp = control_add_pane(c, wp);
|
cp = control_add_pane(c, wp);
|
||||||
|
control_discard_pane(c, cp);
|
||||||
|
memcpy(&cp->offset, &wp->offset, sizeof cp->offset);
|
||||||
|
memcpy(&cp->queued, &wp->offset, sizeof cp->queued);
|
||||||
cp->flags |= CONTROL_PANE_OFF;
|
cp->flags |= CONTROL_PANE_OFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user