Fix: issue 1734 (#1749)
* server/tab: Check suppressed panes when writing to a pane by ID. Previously only the tiled and floating panes would be searched for a pane of a given ID. Fixes: #1734 * server/tab/unit: Test writing to suppressed panes * docs: fix server panics when writing to suppressed panes
This commit is contained in:
parent
480086e3d4
commit
77f05f0f12
3 changed files with 23 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||||
|
|
||||||
* debugging: Improve error handling in screen thread (https://github.com/zellij-org/zellij/pull/1670)
|
* debugging: Improve error handling in screen thread (https://github.com/zellij-org/zellij/pull/1670)
|
||||||
* fix: Server exits when client panics (https://github.com/zellij-org/zellij/pull/1731)
|
* fix: Server exits when client panics (https://github.com/zellij-org/zellij/pull/1731)
|
||||||
|
* fix: Server panics when writing to suppressed pane (https://github.com/zellij-org/zellij/pull/1749)
|
||||||
|
|
||||||
## [0.31.4] - 2022-09-09
|
## [0.31.4] - 2022-09-09
|
||||||
* Terminal compatibility: improve vttest compliance (https://github.com/zellij-org/zellij/pull/1671)
|
* Terminal compatibility: improve vttest compliance (https://github.com/zellij-org/zellij/pull/1671)
|
||||||
|
|
|
||||||
|
|
@ -1032,7 +1032,9 @@ impl Tab {
|
||||||
let active_terminal = self
|
let active_terminal = self
|
||||||
.floating_panes
|
.floating_panes
|
||||||
.get(&pane_id)
|
.get(&pane_id)
|
||||||
.unwrap_or_else(|| self.tiled_panes.get_pane(pane_id).unwrap());
|
.or_else(|| self.tiled_panes.get_pane(pane_id))
|
||||||
|
.or_else(|| self.suppressed_panes.get(&pane_id))
|
||||||
|
.unwrap();
|
||||||
let adjusted_input = active_terminal.adjust_input_to_terminal(input_bytes);
|
let adjusted_input = active_terminal.adjust_input_to_terminal(input_bytes);
|
||||||
|
|
||||||
self.senders
|
self.senders
|
||||||
|
|
|
||||||
|
|
@ -192,6 +192,25 @@ fn create_new_tab_with_cell_size(
|
||||||
tab
|
tab
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn write_to_suppressed_pane() {
|
||||||
|
let size = Size {
|
||||||
|
cols: 121,
|
||||||
|
rows: 20,
|
||||||
|
};
|
||||||
|
let mut tab = create_new_tab(size);
|
||||||
|
tab.vertical_split(PaneId::Terminal(2), 1);
|
||||||
|
|
||||||
|
// Suppress pane 2 and remove it from active panes
|
||||||
|
tab.suppress_active_pane(PaneId::Terminal(2), 1);
|
||||||
|
tab.tiled_panes.remove_pane(PaneId::Terminal(2));
|
||||||
|
|
||||||
|
// Make sure it's suppressed now
|
||||||
|
tab.suppressed_panes.get(&PaneId::Terminal(2)).unwrap();
|
||||||
|
// Write content to it
|
||||||
|
tab.write_to_pane_id(vec![34, 127, 31, 82, 17, 182], PaneId::Terminal(2));
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn split_panes_vertically() {
|
fn split_panes_vertically() {
|
||||||
let size = Size {
|
let size = Size {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue