From 7b69fcb8e081b3419488a56f1adbe3ba45821906 Mon Sep 17 00:00:00 2001 From: Aram Drevekenin Date: Wed, 24 Feb 2021 18:00:00 +0100 Subject: [PATCH] Make fullscreen panes not override the status bar and strider (#209) * work * feat(tab): expansion boundary * fix(layout): add expansion boundary to default layout * style(fmt): rustfmt * style(fmt): remove unnecessary comment --- assets/layouts/default.yaml | 1 + assets/layouts/strider.yaml | 3 +- src/client/layout.rs | 2 + src/client/tab.rs | 148 +++++++++++++----- src/common/input/actions.rs | 4 +- .../expansion-boundary-in-the-middle.yaml | 19 +++ src/tests/integration/expansion_boundary.rs | 118 ++++++++++++++ src/tests/integration/mod.rs | 1 + ...anes_are_open_inside_expansion_border.snap | 55 +++++++ ...__resize_pane_inside_expansion_border.snap | 55 +++++++ ...sion_border_expands_only_until_border.snap | 55 +++++++ src/tests/possible_tty_inputs.rs | 8 +- src/tests/tty_inputs.rs | 46 ++++++ src/tests/utils.rs | 2 - 14 files changed, 468 insertions(+), 49 deletions(-) create mode 100644 src/tests/fixtures/layouts/expansion-boundary-in-the-middle.yaml create mode 100644 src/tests/integration/expansion_boundary.rs create mode 100644 src/tests/integration/snapshots/zellij__tests__integration__expansion_boundary__new_panes_are_open_inside_expansion_border.snap create mode 100644 src/tests/integration/snapshots/zellij__tests__integration__expansion_boundary__resize_pane_inside_expansion_border.snap create mode 100644 src/tests/integration/snapshots/zellij__tests__integration__expansion_boundary__toggling_fullcsreen_in_expansion_border_expands_only_until_border.snap diff --git a/assets/layouts/default.yaml b/assets/layouts/default.yaml index a3987e50b..b8667b8d2 100644 --- a/assets/layouts/default.yaml +++ b/assets/layouts/default.yaml @@ -2,6 +2,7 @@ direction: Horizontal parts: - direction: Vertical + expansion_boundary: true - direction: Vertical split_size: Fixed: 1 diff --git a/assets/layouts/strider.yaml b/assets/layouts/strider.yaml index e33f516a5..1667dd0bb 100644 --- a/assets/layouts/strider.yaml +++ b/assets/layouts/strider.yaml @@ -8,7 +8,8 @@ parts: Percent: 20 plugin: strider - direction: Horizontal + expansion_boundary: true - direction: Vertical split_size: Fixed: 1 - plugin: status-bar \ No newline at end of file + plugin: status-bar diff --git a/src/client/layout.rs b/src/client/layout.rs index 397a26a7b..c032be381 100644 --- a/src/client/layout.rs +++ b/src/client/layout.rs @@ -178,6 +178,8 @@ pub struct Layout { pub split_size: Option, #[serde(skip_serializing_if = "Option::is_none")] pub plugin: Option, + #[serde(default)] + pub expansion_boundary: bool, } impl Layout { diff --git a/src/client/tab.rs b/src/client/tab.rs index b4c5c00a1..bdbf7db13 100644 --- a/src/client/tab.rs +++ b/src/client/tab.rs @@ -14,8 +14,6 @@ use std::{ }; use std::{io::Write, sync::mpsc::channel}; -use crate::utils::logging::debug_log_to_file; - const CURSOR_HEIGHT_WIDTH_RATIO: usize = 4; // this is not accurate and kind of a magic number, TODO: look into this const MIN_TERMINAL_HEIGHT: usize = 2; const MIN_TERMINAL_WIDTH: usize = 4; @@ -62,6 +60,7 @@ pub struct Tab { pub send_pty_instructions: SenderWithContext, pub send_plugin_instructions: SenderWithContext, pub send_app_instructions: SenderWithContext, + expansion_boundary: Option, } // FIXME: Use a struct that has a pane_type enum, to reduce all of the duplication @@ -140,6 +139,14 @@ pub trait Pane { std::cmp::min(self.x() + self.columns(), other.x() + other.columns()) - std::cmp::max(self.x(), other.x()) } + fn position_and_size(&self) -> PositionAndSize { + PositionAndSize { + x: self.x(), + y: self.y(), + columns: self.columns(), + rows: self.rows(), + } + } fn min_width(&self) -> usize { MIN_TERMINAL_WIDTH } @@ -194,6 +201,7 @@ impl Tab { send_app_instructions, send_pty_instructions, send_plugin_instructions, + expansion_boundary: None, } } @@ -232,6 +240,9 @@ impl Tab { let mut new_pids = new_pids.iter(); for (layout, position_and_size) in positions_and_size { // Just a regular terminal + if layout.expansion_boundary { + self.expansion_boundary = Some(*position_and_size); + } if let Some(plugin) = &layout.plugin { let (pid_tx, pid_rx) = channel(); self.send_plugin_instructions @@ -295,7 +306,9 @@ impl Tab { let (id_of_terminal_to_check, terminal_to_check) = id_and_terminal_to_check; let terminal_size = (terminal_to_check.rows() * CURSOR_HEIGHT_WIDTH_RATIO) * terminal_to_check.columns(); + let terminal_pos_and_size = terminal_to_check.position_and_size(); let terminal_can_be_split = terminal_to_check.columns() >= MIN_TERMINAL_WIDTH + && self.pos_and_size_is_within_expansion_boundary(terminal_pos_and_size) && terminal_to_check.rows() >= MIN_TERMINAL_HEIGHT && ((terminal_to_check.columns() > terminal_to_check.min_width() * 2) || (terminal_to_check.rows() > terminal_to_check.min_height() * 2)); @@ -549,12 +562,7 @@ impl Tab { } pub fn toggle_active_pane_fullscreen(&mut self) { if let Some(active_pane_id) = self.get_active_pane_id() { - if self - .get_active_pane() - .unwrap() - .position_and_size_override() - .is_some() - { + if self.fullscreen_is_active { for terminal_id in self.panes_to_hide.iter() { self.panes .get_mut(terminal_id) @@ -565,20 +573,22 @@ impl Tab { let active_terminal = self.panes.get_mut(&active_pane_id).unwrap(); active_terminal.reset_size_and_position_override(); } else { - let terminals = self.get_panes(); - let all_ids_except_current = - terminals.filter_map( - |(&id, _)| { - if id != active_pane_id { - Some(id) - } else { - None - } - }, - ); - self.panes_to_hide = all_ids_except_current.collect(); + let expand_to = self.expansion_boundary.unwrap_or(self.full_screen_ws); + let panes = self.get_panes(); + let pane_ids_to_hide = panes.filter_map(|(&id, pane)| { + let position_and_size_for_pane = pane.position_and_size(); + if id != active_pane_id + && self + .pos_and_size_is_within_expansion_boundary(position_and_size_for_pane) + { + Some(id) + } else { + None + } + }); + self.panes_to_hide = pane_ids_to_hide.collect(); let active_terminal = self.panes.get_mut(&active_pane_id).unwrap(); - active_terminal.override_size_and_position(0, 0, &self.full_screen_ws); + active_terminal.override_size_and_position(expand_to.x, expand_to.y, &expand_to); } let active_terminal = self.panes.get(&active_pane_id).unwrap(); if let PaneId::Terminal(active_pid) = active_pane_id { @@ -1418,6 +1428,21 @@ impl Tab { self.increase_pane_width_left(&terminal_id, count); } } + fn pos_and_size_is_within_expansion_boundary(&self, pos_and_size: PositionAndSize) -> bool { + match self.expansion_boundary { + Some(expansion_boundary) => { + pos_and_size.x >= expansion_boundary.x + && pos_and_size.x < expansion_boundary.x + expansion_boundary.columns + && pos_and_size.y >= expansion_boundary.y + && pos_and_size.y < expansion_boundary.y + expansion_boundary.rows + && pos_and_size.x + pos_and_size.columns + <= expansion_boundary.x + expansion_boundary.columns + && pos_and_size.y + pos_and_size.rows + <= expansion_boundary.y + expansion_boundary.rows + } + None => true, // no expansion boundary, no problem + } + } fn can_increase_pane_and_surroundings_right( &self, pane_id: &PaneId, @@ -1431,10 +1456,19 @@ impl Tab { if !can_increase_pane_size { return false; } + let mut new_pos_and_size_for_pane = pane.position_and_size(); + new_pos_and_size_for_pane.columns += increase_by; + if !self.pos_and_size_is_within_expansion_boundary(new_pos_and_size_for_pane) { + return false; + } + if let Some(panes_to_the_right) = self.pane_ids_directly_right_of(&pane_id) { return panes_to_the_right.iter().all(|id| { let p = self.panes.get(id).unwrap(); - p.columns() > increase_by && p.columns() - increase_by >= p.min_width() + let position_and_size_for_pane = p.position_and_size(); + self.pos_and_size_is_within_expansion_boundary(position_and_size_for_pane) + && p.columns() > increase_by + && p.columns() - increase_by >= p.min_width() }); } else { false @@ -1453,10 +1487,19 @@ impl Tab { if !can_increase_pane_size { return false; } + let mut new_pos_and_size_for_pane = pane.position_and_size(); + new_pos_and_size_for_pane.x = new_pos_and_size_for_pane.x.saturating_sub(increase_by); + if !self.pos_and_size_is_within_expansion_boundary(new_pos_and_size_for_pane) { + return false; + } + if let Some(panes_to_the_left) = self.pane_ids_directly_left_of(&pane_id) { return panes_to_the_left.iter().all(|id| { let p = self.panes.get(id).unwrap(); - p.columns() > increase_by && p.columns() - increase_by >= p.min_width() + let position_and_size_for_pane = p.position_and_size(); + self.pos_and_size_is_within_expansion_boundary(position_and_size_for_pane) + && p.columns() > increase_by + && p.columns() - increase_by >= p.min_width() }); } else { false @@ -1475,10 +1518,19 @@ impl Tab { if !can_increase_pane_size { return false; } + let mut new_pos_and_size_for_pane = pane.position_and_size(); + new_pos_and_size_for_pane.rows += increase_by; + if !self.pos_and_size_is_within_expansion_boundary(new_pos_and_size_for_pane) { + return false; + } + if let Some(panes_below) = self.pane_ids_directly_below(&pane_id) { return panes_below.iter().all(|id| { let p = self.panes.get(id).unwrap(); - p.rows() > increase_by && p.rows() - increase_by >= p.min_height() + let position_and_size_for_pane = p.position_and_size(); + self.pos_and_size_is_within_expansion_boundary(position_and_size_for_pane) + && p.rows() > increase_by + && p.rows() - increase_by >= p.min_height() }); } else { false @@ -1493,10 +1545,19 @@ impl Tab { if !can_increase_pane_size { return false; } + let mut new_pos_and_size_for_pane = pane.position_and_size(); + new_pos_and_size_for_pane.y = new_pos_and_size_for_pane.y.saturating_sub(increase_by); + if !self.pos_and_size_is_within_expansion_boundary(new_pos_and_size_for_pane) { + return false; + } + if let Some(panes_above) = self.pane_ids_directly_above(&pane_id) { return panes_above.iter().all(|id| { let p = self.panes.get(id).unwrap(); - p.rows() > increase_by && p.rows() - increase_by >= p.min_height() + let position_and_size_for_pane = p.position_and_size(); + self.pos_and_size_is_within_expansion_boundary(position_and_size_for_pane) + && p.rows() > increase_by + && p.rows() - increase_by >= p.min_height() }); } else { false @@ -1513,9 +1574,11 @@ impl Tab { if let Some(panes_to_the_left) = self.pane_ids_directly_left_of(&pane_id) { return panes_to_the_left.iter().all(|id| { let p = self.panes.get(id).unwrap(); - p.max_width() - .map(|max_width| p.columns() + reduce_by <= max_width) - .unwrap_or(true) // no max width, increase to your heart's content + let position_and_size_for_pane = p.position_and_size(); + self.pos_and_size_is_within_expansion_boundary(position_and_size_for_pane) + && p.max_width() + .map(|max_width| p.columns() + reduce_by <= max_width) + .unwrap_or(true) // no max width, increase to your heart's content }); } else { false @@ -1532,9 +1595,11 @@ impl Tab { if let Some(panes_to_the_right) = self.pane_ids_directly_right_of(&pane_id) { return panes_to_the_right.iter().all(|id| { let p = self.panes.get(id).unwrap(); - p.max_width() - .map(|max_width| p.columns() + reduce_by <= max_width) - .unwrap_or(true) // no max width, increase to your heart's content + let position_and_size_for_pane = p.position_and_size(); + self.pos_and_size_is_within_expansion_boundary(position_and_size_for_pane) + && p.max_width() + .map(|max_width| p.columns() + reduce_by <= max_width) + .unwrap_or(true) // no max width, increase to your heart's content }); } else { false @@ -1551,9 +1616,11 @@ impl Tab { if let Some(panes_above) = self.pane_ids_directly_above(&pane_id) { return panes_above.iter().all(|id| { let p = self.panes.get(id).unwrap(); - p.max_height() - .map(|max_height| p.rows() + reduce_by <= max_height) - .unwrap_or(true) // no max height, increase to your heart's content + let position_and_size_for_pane = p.position_and_size(); + self.pos_and_size_is_within_expansion_boundary(position_and_size_for_pane) + && p.max_height() + .map(|max_height| p.rows() + reduce_by <= max_height) + .unwrap_or(true) // no max height, increase to your heart's content }); } else { false @@ -1570,9 +1637,11 @@ impl Tab { if let Some(panes_below) = self.pane_ids_directly_below(&pane_id) { return panes_below.iter().all(|id| { let p = self.panes.get(id).unwrap(); - p.max_height() - .map(|max_height| p.rows() + reduce_by <= max_height) - .unwrap_or(true) // no max height, increase to your heart's content + let position_and_size_for_pane = p.position_and_size(); + self.pos_and_size_is_within_expansion_boundary(position_and_size_for_pane) + && p.max_height() + .map(|max_height| p.rows() + reduce_by <= max_height) + .unwrap_or(true) // no max height, increase to your heart's content }); } else { false @@ -1899,11 +1968,6 @@ impl Tab { } } pub fn set_pane_invisible_borders(&mut self, id: PaneId, invisible_borders: bool) { - debug_log_to_file(format!( - "set_pane_invisible_borders: {:?}", - invisible_borders - )) - .expect("Must be able to write to log file"); if let Some(pane) = self.panes.get_mut(&id) { pane.set_invisible_borders(invisible_borders); } diff --git a/src/common/input/actions.rs b/src/common/input/actions.rs index 00c18c1e9..eee8b1b6b 100644 --- a/src/common/input/actions.rs +++ b/src/common/input/actions.rs @@ -3,7 +3,7 @@ use super::handler; /// The four directions (left, right, up, down). -#[derive(Clone)] +#[derive(Clone, Debug)] pub enum Direction { Left, Right, @@ -12,7 +12,7 @@ pub enum Direction { } /// Actions that can be bound to keys. -#[derive(Clone)] +#[derive(Clone, Debug)] pub enum Action { /// Quit Zellij. Quit, diff --git a/src/tests/fixtures/layouts/expansion-boundary-in-the-middle.yaml b/src/tests/fixtures/layouts/expansion-boundary-in-the-middle.yaml new file mode 100644 index 000000000..9227c080e --- /dev/null +++ b/src/tests/fixtures/layouts/expansion-boundary-in-the-middle.yaml @@ -0,0 +1,19 @@ +--- +direction: Horizontal +parts: + - direction: Vertical + split_size: + Percent: 40 + - direction: Vertical + parts: + - direction: Horizontal + split_size: + Percent: 40 + - direction: Horizontal + expansion_boundary: true + - direction: Horizontal + split_size: + Percent: 40 + - direction: Vertical + split_size: + Percent: 40 diff --git a/src/tests/integration/expansion_boundary.rs b/src/tests/integration/expansion_boundary.rs new file mode 100644 index 000000000..1c3776e91 --- /dev/null +++ b/src/tests/integration/expansion_boundary.rs @@ -0,0 +1,118 @@ +use insta::assert_snapshot; +use std::path::PathBuf; + +use crate::panes::PositionAndSize; +use crate::tests::fakes::FakeInputOutput; +use crate::tests::utils::commands::{ + COMMAND_TOGGLE, ESC, PANE_MODE, QUIT, RESIZE_DOWN_IN_RESIZE_MODE, RESIZE_MODE, + SPAWN_TERMINAL_IN_PANE_MODE, TOGGLE_ACTIVE_TERMINAL_FULLSCREEN_IN_PANE_MODE, +}; +use crate::tests::utils::{get_next_to_last_snapshot, get_output_frame_snapshots}; +use crate::{start, CliArgs}; + +fn get_fake_os_input(fake_win_size: &PositionAndSize) -> FakeInputOutput { + FakeInputOutput::new(fake_win_size.clone()) +} + +#[test] +pub fn new_panes_are_open_inside_expansion_border() { + let fake_win_size = PositionAndSize { + columns: 121, + rows: 50, + x: 0, + y: 0, + }; + let mut fake_input_output = get_fake_os_input(&fake_win_size); + fake_input_output.add_terminal_input(&[ + &COMMAND_TOGGLE, + &PANE_MODE, + &SPAWN_TERMINAL_IN_PANE_MODE, + &QUIT, + ]); + let mut opts = CliArgs::default(); + opts.layout = Some(PathBuf::from( + "src/tests/fixtures/layouts/expansion-boundary-in-the-middle.yaml", + )); + + start(Box::new(fake_input_output.clone()), opts); + let output_frames = fake_input_output + .stdout_writer + .output_frames + .lock() + .unwrap(); + let snapshots = get_output_frame_snapshots(&output_frames, &fake_win_size); + + let next_to_last_snapshot = get_next_to_last_snapshot(snapshots).unwrap(); + assert_snapshot!(next_to_last_snapshot); +} + +#[test] +pub fn resize_pane_inside_expansion_border() { + let fake_win_size = PositionAndSize { + columns: 121, + rows: 50, + x: 0, + y: 0, + }; + let mut fake_input_output = get_fake_os_input(&fake_win_size); + fake_input_output.add_terminal_input(&[ + &COMMAND_TOGGLE, + &PANE_MODE, + &SPAWN_TERMINAL_IN_PANE_MODE, + &ESC, + &RESIZE_MODE, + &RESIZE_DOWN_IN_RESIZE_MODE, + &QUIT, + ]); + let mut opts = CliArgs::default(); + opts.layout = Some(PathBuf::from( + "src/tests/fixtures/layouts/expansion-boundary-in-the-middle.yaml", + )); + + start(Box::new(fake_input_output.clone()), opts); + let output_frames = fake_input_output + .stdout_writer + .output_frames + .lock() + .unwrap(); + let snapshots = get_output_frame_snapshots(&output_frames, &fake_win_size); + + let next_to_last_snapshot = get_next_to_last_snapshot(snapshots).unwrap(); + assert_snapshot!(next_to_last_snapshot); +} + +#[test] +pub fn toggling_fullcsreen_in_expansion_border_expands_only_until_border() { + let fake_win_size = PositionAndSize { + columns: 121, + rows: 50, + x: 0, + y: 0, + }; + let mut fake_input_output = get_fake_os_input(&fake_win_size); + fake_input_output.add_terminal_input(&[ + &COMMAND_TOGGLE, + &PANE_MODE, + &SPAWN_TERMINAL_IN_PANE_MODE, + &TOGGLE_ACTIVE_TERMINAL_FULLSCREEN_IN_PANE_MODE, + &QUIT, + ]); + let mut opts = CliArgs::default(); + opts.layout = Some(PathBuf::from( + "src/tests/fixtures/layouts/expansion-boundary-in-the-middle.yaml", + )); + + start(Box::new(fake_input_output.clone()), opts); + let output_frames = fake_input_output + .stdout_writer + .output_frames + .lock() + .unwrap(); + let snapshots = get_output_frame_snapshots(&output_frames, &fake_win_size); + + let next_to_last_snapshot = get_next_to_last_snapshot(snapshots).unwrap(); + assert_snapshot!(next_to_last_snapshot); +} + +// TODO: +// * fullscreen with expansion boundary diff --git a/src/tests/integration/mod.rs b/src/tests/integration/mod.rs index 512db9d02..9036ad6d9 100644 --- a/src/tests/integration/mod.rs +++ b/src/tests/integration/mod.rs @@ -1,6 +1,7 @@ pub mod basic; pub mod close_pane; pub mod compatibility; +pub mod expansion_boundary; pub mod layouts; pub mod move_focus_down; pub mod move_focus_left; diff --git a/src/tests/integration/snapshots/zellij__tests__integration__expansion_boundary__new_panes_are_open_inside_expansion_border.snap b/src/tests/integration/snapshots/zellij__tests__integration__expansion_boundary__new_panes_are_open_inside_expansion_border.snap new file mode 100644 index 000000000..661eaf963 --- /dev/null +++ b/src/tests/integration/snapshots/zellij__tests__integration__expansion_boundary__new_panes_are_open_inside_expansion_border.snap @@ -0,0 +1,55 @@ +--- +source: src/tests/integration/expansion_boundary.rs +expression: next_to_last_snapshot + +--- +line2-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line3-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line4-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line5-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line6-aaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line15-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line16-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line17-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line18-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line19-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +prompt $ +───────────────────────────────────────────────┬─────────────────────────┬─────────────────────────────────────────────── +line11-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line16-bbbbbbbbbbbbbbbbbb│line11-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line12-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line17-bbbbbbbbbbbbbbbbbb│line12-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line13-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line18-bbbbbbbbbbbbbbbbbb│line13-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line14-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line19-bbbbbbbbbbbbbbbbbb│line14-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line15-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│prompt $ │line15-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line16-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb├─────────────────────────┤line16-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line17-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line17-bbbbbbbbbbbbbbbbbb│line17-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line18-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line18-bbbbbbbbbbbbbbbbbb│line18-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line19-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line19-bbbbbbbbbbbbbbbbbb│line19-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +prompt $ │prompt $ █ │prompt $ +───────────────────────────────────────────────┴─────────────────────────┴─────────────────────────────────────────────── +line2-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line3-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line4-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line5-aaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line14-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line15-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line16-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line17-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line18-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line19-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +prompt $ diff --git a/src/tests/integration/snapshots/zellij__tests__integration__expansion_boundary__resize_pane_inside_expansion_border.snap b/src/tests/integration/snapshots/zellij__tests__integration__expansion_boundary__resize_pane_inside_expansion_border.snap new file mode 100644 index 000000000..a3d009cef --- /dev/null +++ b/src/tests/integration/snapshots/zellij__tests__integration__expansion_boundary__resize_pane_inside_expansion_border.snap @@ -0,0 +1,55 @@ +--- +source: src/tests/integration/expansion_boundary.rs +expression: next_to_last_snapshot + +--- +line2-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +prompt $ +───────────────────────────────────────────────┬─────────────────────────┬─────────────────────────────────────────────── +line11-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line14-bbbbbbbbbbbbbbbbbb│line11-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line12-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line15-bbbbbbbbbbbbbbbbbb│line12-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line13-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line16-bbbbbbbbbbbbbbbbbb│line13-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line14-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line17-bbbbbbbbbbbbbbbbbb│line14-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line15-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line18-bbbbbbbbbbbbbbbbbb│line15-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line16-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line19-bbbbbbbbbbbbbbbbbb│line16-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line17-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│prompt $ │line17-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line18-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb├─────────────────────────┤line18-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line19-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line19-bbbbbbbbbbbbbbbbbb│line19-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +prompt $ │prompt $ █ │prompt $ +───────────────────────────────────────────────┴─────────────────────────┴─────────────────────────────────────────────── +line2-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line3-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line4-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line5-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line6-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line7-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line8-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line9-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line19-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +prompt $ diff --git a/src/tests/integration/snapshots/zellij__tests__integration__expansion_boundary__toggling_fullcsreen_in_expansion_border_expands_only_until_border.snap b/src/tests/integration/snapshots/zellij__tests__integration__expansion_boundary__toggling_fullcsreen_in_expansion_border_expands_only_until_border.snap new file mode 100644 index 000000000..41a54185c --- /dev/null +++ b/src/tests/integration/snapshots/zellij__tests__integration__expansion_boundary__toggling_fullcsreen_in_expansion_border_expands_only_until_border.snap @@ -0,0 +1,55 @@ +--- +source: src/tests/integration/expansion_boundary.rs +expression: next_to_last_snapshot + +--- +line2-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line3-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line4-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line5-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line6-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line16-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line17-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line18-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line19-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +prompt $ +───────────────────────────────────────────────┬─────────────────────────┬─────────────────────────────────────────────── +line11-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line11-bbbbbbbbbbbbbbbbbb│line11-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line12-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line12-bbbbbbbbbbbbbbbbbb│line12-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line13-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line13-bbbbbbbbbbbbbbbbbb│line13-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line14-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line14-bbbbbbbbbbbbbbbbbb│line14-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line15-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line15-bbbbbbbbbbbbbbbbbb│line15-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line16-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line16-bbbbbbbbbbbbbbbbbb│line16-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line17-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line17-bbbbbbbbbbbbbbbbbb│line17-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line18-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line18-bbbbbbbbbbbbbbbbbb│line18-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line19-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line19-bbbbbbbbbbbbbbbbbb│line19-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +prompt $ │prompt $ █ │prompt $ +───────────────────────────────────────────────┴─────────────────────────┴─────────────────────────────────────────────── +line2-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line3-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line4-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line5-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line15-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line16-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line17-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line18-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line19-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +prompt $ diff --git a/src/tests/possible_tty_inputs.rs b/src/tests/possible_tty_inputs.rs index fb1cc5c6a..fa918be04 100644 --- a/src/tests/possible_tty_inputs.rs +++ b/src/tests/possible_tty_inputs.rs @@ -1,6 +1,6 @@ use crate::tests::tty_inputs::{ - COL_10, COL_121, COL_14, COL_15, COL_19, COL_20, COL_24, COL_29, COL_30, COL_34, COL_39, COL_4, - COL_40, COL_50, COL_60, COL_70, COL_8, COL_9, COL_90, COL_96, + COL_10, COL_121, COL_14, COL_15, COL_19, COL_20, COL_24, COL_25, COL_29, COL_30, COL_34, + COL_39, COL_4, COL_40, COL_47, COL_50, COL_60, COL_70, COL_8, COL_9, COL_90, COL_96, }; use std::collections::HashMap; use std::fs; @@ -59,11 +59,13 @@ pub fn get_possible_tty_inputs() -> HashMap { let col_19_bytes = Bytes::new().content_from_str(&COL_19); let col_20_bytes = Bytes::new().content_from_str(&COL_20); let col_24_bytes = Bytes::new().content_from_str(&COL_24); + let col_25_bytes = Bytes::new().content_from_str(&COL_25); let col_29_bytes = Bytes::new().content_from_str(&COL_29); let col_30_bytes = Bytes::new().content_from_str(&COL_30); let col_34_bytes = Bytes::new().content_from_str(&COL_34); let col_39_bytes = Bytes::new().content_from_str(&COL_39); let col_40_bytes = Bytes::new().content_from_str(&COL_40); + let col_47_bytes = Bytes::new().content_from_str(&COL_47); let col_50_bytes = Bytes::new().content_from_str(&COL_50); let col_60_bytes = Bytes::new().content_from_str(&COL_60); let col_70_bytes = Bytes::new().content_from_str(&COL_70); @@ -79,11 +81,13 @@ pub fn get_possible_tty_inputs() -> HashMap { possible_inputs.insert(19, col_19_bytes); possible_inputs.insert(20, col_20_bytes); possible_inputs.insert(24, col_24_bytes); + possible_inputs.insert(25, col_25_bytes); possible_inputs.insert(29, col_29_bytes); possible_inputs.insert(30, col_30_bytes); possible_inputs.insert(34, col_34_bytes); possible_inputs.insert(39, col_39_bytes); possible_inputs.insert(40, col_40_bytes); + possible_inputs.insert(47, col_47_bytes); possible_inputs.insert(50, col_50_bytes); possible_inputs.insert(60, col_60_bytes); possible_inputs.insert(70, col_70_bytes); diff --git a/src/tests/tty_inputs.rs b/src/tests/tty_inputs.rs index 09f67abe8..cf49290ee 100644 --- a/src/tests/tty_inputs.rs +++ b/src/tests/tty_inputs.rs @@ -227,6 +227,29 @@ pub const COL_24: [&str; 20] = [ "line19-bbbbbbbbbbbbbbbbb\r\n", "prompt $ ", ]; + +pub const COL_25: [&str; 20] = [ + "line1-bbbbbbbbbbbbbbbbbbb\r\n", + "line2-bbbbbbbbbbbbbbbbbbb\r\n", + "line3-bbbbbbbbbbbbbbbbbbb\r\n", + "line4-bbbbbbbbbbbbbbbbbbb\r\n", + "line5-bbbbbbbbbbbbbbbbbbb\r\n", + "line6-bbbbbbbbbbbbbbbbbbb\r\n", + "line7-bbbbbbbbbbbbbbbbbbb\r\n", + "line8-bbbbbbbbbbbbbbbbbbb\r\n", + "line9-bbbbbbbbbbbbbbbbbbb\r\n", + "line10-bbbbbbbbbbbbbbbbbb\r\n", + "line11-bbbbbbbbbbbbbbbbbb\r\n", + "line12-bbbbbbbbbbbbbbbbbb\r\n", + "line13-bbbbbbbbbbbbbbbbbb\r\n", + "line14-bbbbbbbbbbbbbbbbbb\r\n", + "line15-bbbbbbbbbbbbbbbbbb\r\n", + "line16-bbbbbbbbbbbbbbbbbb\r\n", + "line17-bbbbbbbbbbbbbbbbbb\r\n", + "line18-bbbbbbbbbbbbbbbbbb\r\n", + "line19-bbbbbbbbbbbbbbbbbb\r\n", + "prompt $ ", +]; pub const COL_29: [&str; 20] = [ "line1-bbbbbbbbbbbbbbbbbbbbbbb\r\n", "line2-bbbbbbbbbbbbbbbbbbbbbbb\r\n", @@ -342,6 +365,29 @@ pub const COL_39: [&str; 20] = [ "prompt $ ", ]; +pub const COL_47: [&str; 20] = [ + "line1-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\r\n", + "line2-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\r\n", + "line3-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\r\n", + "line4-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\r\n", + "line5-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\r\n", + "line6-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\r\n", + "line7-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\r\n", + "line8-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\r\n", + "line9-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\r\n", + "line10-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\r\n", + "line11-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\r\n", + "line12-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\r\n", + "line13-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\r\n", + "line14-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\r\n", + "line15-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\r\n", + "line16-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\r\n", + "line17-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\r\n", + "line18-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\r\n", + "line19-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\r\n", + "prompt $ ", +]; + pub const COL_50: [&str; 20] = [ "line1-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\r\n", "line2-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\r\n", diff --git a/src/tests/utils.rs b/src/tests/utils.rs index 08c87cbf0..587d36fdd 100644 --- a/src/tests/utils.rs +++ b/src/tests/utils.rs @@ -1,8 +1,6 @@ use crate::panes::PositionAndSize; use crate::panes::TerminalPane; -use crate::utils::logging::debug_log_to_file; - pub fn get_output_frame_snapshots( output_frames: &[Vec], win_size: &PositionAndSize,