Fixed a build warning and renamed a struct field
This commit is contained in:
parent
949971cc62
commit
5164bd99b7
23 changed files with 184 additions and 186 deletions
|
|
@ -57,7 +57,6 @@ impl ZellijPlugin for State {
|
||||||
let tab = tab_style(
|
let tab = tab_style(
|
||||||
tabname,
|
tabname,
|
||||||
t.active,
|
t.active,
|
||||||
t.position,
|
|
||||||
t.is_sync_panes_active,
|
t.is_sync_panes_active,
|
||||||
self.mode_info.palette,
|
self.mode_info.palette,
|
||||||
self.mode_info.capabilities,
|
self.mode_info.capabilities,
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,6 @@ pub fn non_active_tab(text: String, palette: Palette, separator: &str) -> LinePa
|
||||||
pub fn tab_style(
|
pub fn tab_style(
|
||||||
text: String,
|
text: String,
|
||||||
is_active_tab: bool,
|
is_active_tab: bool,
|
||||||
position: usize,
|
|
||||||
is_sync_panes_active: bool,
|
is_sync_panes_active: bool,
|
||||||
palette: Palette,
|
palette: Palette,
|
||||||
capabilities: PluginCapabilities,
|
capabilities: PluginCapabilities,
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ fn get_fake_os_input(fake_win_size: &PositionAndSize) -> FakeInputOutput {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn starts_with_one_terminal() {
|
pub fn starts_with_one_terminal() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -48,7 +48,7 @@ pub fn starts_with_one_terminal() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn split_terminals_vertically() {
|
pub fn split_terminals_vertically() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -76,7 +76,7 @@ pub fn split_terminals_vertically() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn split_terminals_horizontally() {
|
pub fn split_terminals_horizontally() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -105,7 +105,7 @@ pub fn split_terminals_horizontally() {
|
||||||
pub fn split_largest_terminal() {
|
pub fn split_largest_terminal() {
|
||||||
// this finds the largest pane and splits along its longest edge (vertically or horizontally)
|
// this finds the largest pane and splits along its longest edge (vertically or horizontally)
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -139,7 +139,7 @@ pub fn split_largest_terminal() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn cannot_split_terminals_vertically_when_active_terminal_is_too_small() {
|
pub fn cannot_split_terminals_vertically_when_active_terminal_is_too_small() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 8,
|
cols: 8,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -167,7 +167,7 @@ pub fn cannot_split_terminals_vertically_when_active_terminal_is_too_small() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn cannot_split_terminals_horizontally_when_active_terminal_is_too_small() {
|
pub fn cannot_split_terminals_horizontally_when_active_terminal_is_too_small() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 4,
|
rows: 4,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -195,7 +195,7 @@ pub fn cannot_split_terminals_horizontally_when_active_terminal_is_too_small() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn cannot_split_largest_terminal_when_there_is_no_room() {
|
pub fn cannot_split_largest_terminal_when_there_is_no_room() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 8,
|
cols: 8,
|
||||||
rows: 4,
|
rows: 4,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -223,7 +223,7 @@ pub fn cannot_split_largest_terminal_when_there_is_no_room() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn scrolling_up_inside_a_pane() {
|
pub fn scrolling_up_inside_a_pane() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -259,7 +259,7 @@ pub fn scrolling_up_inside_a_pane() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn scrolling_down_inside_a_pane() {
|
pub fn scrolling_down_inside_a_pane() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -297,7 +297,7 @@ pub fn scrolling_down_inside_a_pane() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn scrolling_page_up_inside_a_pane() {
|
pub fn scrolling_page_up_inside_a_pane() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -332,7 +332,7 @@ pub fn scrolling_page_up_inside_a_pane() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn scrolling_page_down_inside_a_pane() {
|
pub fn scrolling_page_down_inside_a_pane() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -372,7 +372,7 @@ pub fn max_panes() {
|
||||||
// with the --max-panes option, we only allow a certain amount of panes on screen
|
// with the --max-panes option, we only allow a certain amount of panes on screen
|
||||||
// simultaneously, new panes beyond this limit will close older panes on screen
|
// simultaneously, new panes beyond this limit will close older panes on screen
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -409,7 +409,7 @@ pub fn max_panes() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn toggle_focused_pane_fullscreen() {
|
pub fn toggle_focused_pane_fullscreen() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -452,7 +452,7 @@ pub fn bracketed_paste() {
|
||||||
// since it's inside a bracketed paste block, while the "QUIT" command is, since it is already
|
// since it's inside a bracketed paste block, while the "QUIT" command is, since it is already
|
||||||
// past the block
|
// past the block
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ pub fn close_pane_with_another_pane_above_it() {
|
||||||
// └───────────┘ └───────────┘
|
// └───────────┘ └───────────┘
|
||||||
// █ == pane being closed
|
// █ == pane being closed
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -70,7 +70,7 @@ pub fn close_pane_with_another_pane_below_it() {
|
||||||
// └───────────┘ └───────────┘
|
// └───────────┘ └───────────┘
|
||||||
// █ == pane being closed
|
// █ == pane being closed
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -111,7 +111,7 @@ pub fn close_pane_with_another_pane_to_the_left() {
|
||||||
// └─────┴─────┘ └──────────┘
|
// └─────┴─────┘ └──────────┘
|
||||||
// █ == pane being closed
|
// █ == pane being closed
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -151,7 +151,7 @@ pub fn close_pane_with_another_pane_to_the_right() {
|
||||||
// └─────┴─────┘ └──────────┘
|
// └─────┴─────┘ └──────────┘
|
||||||
// █ == pane being closed
|
// █ == pane being closed
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -194,7 +194,7 @@ pub fn close_pane_with_multiple_panes_above_it() {
|
||||||
// └───────────┘ └─────┴─────┘
|
// └───────────┘ └─────┴─────┘
|
||||||
// █ == pane being closed
|
// █ == pane being closed
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -240,7 +240,7 @@ pub fn close_pane_with_multiple_panes_below_it() {
|
||||||
// └─────┴─────┘ └─────┴─────┘
|
// └─────┴─────┘ └─────┴─────┘
|
||||||
// █ == pane being closed
|
// █ == pane being closed
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -284,7 +284,7 @@ pub fn close_pane_with_multiple_panes_to_the_left() {
|
||||||
// └─────┴─────┘ └──────────┘
|
// └─────┴─────┘ └──────────┘
|
||||||
// █ == pane being closed
|
// █ == pane being closed
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -330,7 +330,7 @@ pub fn close_pane_with_multiple_panes_to_the_right() {
|
||||||
// └─────┴─────┘ └──────────┘
|
// └─────┴─────┘ └──────────┘
|
||||||
// █ == pane being closed
|
// █ == pane being closed
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -374,7 +374,7 @@ pub fn close_pane_with_multiple_panes_above_it_away_from_screen_edges() {
|
||||||
// └───┴───────┴───┘ └───┴───┴───┴───┘
|
// └───┴───────┴───┘ └───┴───┴───┴───┘
|
||||||
// █ == pane being closed
|
// █ == pane being closed
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -441,7 +441,7 @@ pub fn close_pane_with_multiple_panes_below_it_away_from_screen_edges() {
|
||||||
// └───┴───┴───┴───┘ └───┴───┴───┴───┘
|
// └───┴───┴───┴───┘ └───┴───┴───┴───┘
|
||||||
// █ == pane being closed
|
// █ == pane being closed
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -506,7 +506,7 @@ pub fn close_pane_with_multiple_panes_to_the_left_away_from_screen_edges() {
|
||||||
// └────┴──────┘ └────┴──────┘
|
// └────┴──────┘ └────┴──────┘
|
||||||
// █ == pane being closed
|
// █ == pane being closed
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 30,
|
rows: 30,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -571,7 +571,7 @@ pub fn close_pane_with_multiple_panes_to_the_right_away_from_screen_edges() {
|
||||||
// └────┴──────┘ └────┴──────┘
|
// └────┴──────┘ └────┴──────┘
|
||||||
// █ == pane being closed
|
// █ == pane being closed
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 30,
|
rows: 30,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -626,7 +626,7 @@ pub fn close_pane_with_multiple_panes_to_the_right_away_from_screen_edges() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn closing_last_pane_exits_app() {
|
pub fn closing_last_pane_exits_app() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
|
||||||
|
|
@ -27,14 +27,14 @@ use zellij_utils::input::config::Config;
|
||||||
fn get_fake_os_input(fake_win_size: &PositionAndSize, fixture_name: &str) -> FakeInputOutput {
|
fn get_fake_os_input(fake_win_size: &PositionAndSize, fixture_name: &str) -> FakeInputOutput {
|
||||||
let mut tty_inputs = HashMap::new();
|
let mut tty_inputs = HashMap::new();
|
||||||
let fixture_bytes = Bytes::from_file_in_fixtures(&fixture_name);
|
let fixture_bytes = Bytes::from_file_in_fixtures(&fixture_name);
|
||||||
tty_inputs.insert(fake_win_size.columns as u16, fixture_bytes);
|
tty_inputs.insert(fake_win_size.cols as u16, fixture_bytes);
|
||||||
FakeInputOutput::new(fake_win_size.clone()).with_tty_inputs(tty_inputs)
|
FakeInputOutput::new(fake_win_size.clone()).with_tty_inputs(tty_inputs)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
pub fn run_bandwhich_from_fish_shell() {
|
pub fn run_bandwhich_from_fish_shell() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 116,
|
cols: 116,
|
||||||
rows: 28,
|
rows: 28,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -64,7 +64,7 @@ pub fn run_bandwhich_from_fish_shell() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn fish_tab_completion_options() {
|
pub fn fish_tab_completion_options() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 116,
|
cols: 116,
|
||||||
rows: 28,
|
rows: 28,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -98,7 +98,7 @@ pub fn fish_select_tab_completion_options() {
|
||||||
// this is not clearly seen in the snapshot because it does not include styles,
|
// this is not clearly seen in the snapshot because it does not include styles,
|
||||||
// but we can see the command line change and the cursor staying in place
|
// but we can see the command line change and the cursor staying in place
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 116,
|
cols: 116,
|
||||||
rows: 28,
|
rows: 28,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -136,7 +136,7 @@ pub fn vim_scroll_region_down() {
|
||||||
// file
|
// file
|
||||||
// experience appear to the user
|
// experience appear to the user
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 116,
|
cols: 116,
|
||||||
rows: 28,
|
rows: 28,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -171,7 +171,7 @@ pub fn vim_ctrl_d() {
|
||||||
// end of the scroll region
|
// end of the scroll region
|
||||||
// vim makes sure to fill these empty lines with the rest of the file
|
// vim makes sure to fill these empty lines with the rest of the file
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 116,
|
cols: 116,
|
||||||
rows: 28,
|
rows: 28,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -205,7 +205,7 @@ pub fn vim_ctrl_u() {
|
||||||
// this causes the effect of scrolling up X lines (vim replaces the lines with the ones in the
|
// this causes the effect of scrolling up X lines (vim replaces the lines with the ones in the
|
||||||
// file above the current content)
|
// file above the current content)
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 116,
|
cols: 116,
|
||||||
rows: 28,
|
rows: 28,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -234,7 +234,7 @@ pub fn vim_ctrl_u() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn htop() {
|
pub fn htop() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 116,
|
cols: 116,
|
||||||
rows: 28,
|
rows: 28,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -263,7 +263,7 @@ pub fn htop() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn htop_scrolling() {
|
pub fn htop_scrolling() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 116,
|
cols: 116,
|
||||||
rows: 28,
|
rows: 28,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -292,7 +292,7 @@ pub fn htop_scrolling() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn htop_right_scrolling() {
|
pub fn htop_right_scrolling() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 116,
|
cols: 116,
|
||||||
rows: 28,
|
rows: 28,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -329,7 +329,7 @@ pub fn vim_overwrite() {
|
||||||
// * confirm you would like to change the file by pressing 'y' and then ENTER
|
// * confirm you would like to change the file by pressing 'y' and then ENTER
|
||||||
// * if everything looks fine, this test passed :)
|
// * if everything looks fine, this test passed :)
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 116,
|
cols: 116,
|
||||||
rows: 28,
|
rows: 28,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -361,7 +361,7 @@ pub fn clear_scroll_region() {
|
||||||
// this means that when vim exits, we get back the previous scroll
|
// this means that when vim exits, we get back the previous scroll
|
||||||
// buffer
|
// buffer
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 116,
|
cols: 116,
|
||||||
rows: 28,
|
rows: 28,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -390,7 +390,7 @@ pub fn clear_scroll_region() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn display_tab_characters_properly() {
|
pub fn display_tab_characters_properly() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 116,
|
cols: 116,
|
||||||
rows: 28,
|
rows: 28,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -419,7 +419,7 @@ pub fn display_tab_characters_properly() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn neovim_insert_mode() {
|
pub fn neovim_insert_mode() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 116,
|
cols: 116,
|
||||||
rows: 28,
|
rows: 28,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -450,7 +450,7 @@ pub fn bash_cursor_linewrap() {
|
||||||
// this test makes sure that when we enter a command that is beyond the screen border, that it
|
// this test makes sure that when we enter a command that is beyond the screen border, that it
|
||||||
// immediately goes down one line
|
// immediately goes down one line
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 116,
|
cols: 116,
|
||||||
rows: 28,
|
rows: 28,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -481,7 +481,7 @@ pub fn fish_paste_multiline() {
|
||||||
// here we paste a multiline command in fish shell, making sure we support it
|
// here we paste a multiline command in fish shell, making sure we support it
|
||||||
// going up and changing the colors of our line-wrapped pasted text
|
// going up and changing the colors of our line-wrapped pasted text
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 149,
|
cols: 149,
|
||||||
rows: 28,
|
rows: 28,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -510,7 +510,7 @@ pub fn fish_paste_multiline() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn git_log() {
|
pub fn git_log() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 149,
|
cols: 149,
|
||||||
rows: 28,
|
rows: 28,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -541,7 +541,7 @@ pub fn git_diff_scrollup() {
|
||||||
// this tests makes sure that when we have a git diff that exceeds the screen size
|
// this tests makes sure that when we have a git diff that exceeds the screen size
|
||||||
// we are able to scroll up
|
// we are able to scroll up
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 149,
|
cols: 149,
|
||||||
rows: 28,
|
rows: 28,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -570,7 +570,7 @@ pub fn git_diff_scrollup() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn emacs_longbuf() {
|
pub fn emacs_longbuf() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 284,
|
cols: 284,
|
||||||
rows: 60,
|
rows: 60,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -599,7 +599,7 @@ pub fn emacs_longbuf() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn top_and_quit() {
|
pub fn top_and_quit() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 235,
|
cols: 235,
|
||||||
rows: 56,
|
rows: 56,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -634,7 +634,7 @@ pub fn exa_plus_omf_theme() {
|
||||||
// over existing on-screen content without deleting it, so we must
|
// over existing on-screen content without deleting it, so we must
|
||||||
// convert it to spaces
|
// convert it to spaces
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 235,
|
cols: 235,
|
||||||
rows: 56,
|
rows: 56,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ fn get_fake_os_input(fake_win_size: &PositionAndSize) -> FakeInputOutput {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn accepts_basic_layout() {
|
pub fn accepts_basic_layout() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ fn get_fake_os_input(fake_win_size: &PositionAndSize) -> FakeInputOutput {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn move_focus_down() {
|
pub fn move_focus_down() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -54,7 +54,7 @@ pub fn move_focus_down() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn move_focus_down_to_the_most_recently_used_pane() {
|
pub fn move_focus_down_to_the_most_recently_used_pane() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ fn get_fake_os_input(fake_win_size: &PositionAndSize) -> FakeInputOutput {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn move_focus_left() {
|
pub fn move_focus_left() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -54,7 +54,7 @@ pub fn move_focus_left() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn move_focus_left_to_the_most_recently_used_pane() {
|
pub fn move_focus_left_to_the_most_recently_used_pane() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -92,7 +92,7 @@ pub fn move_focus_left_to_the_most_recently_used_pane() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn move_focus_left_changes_tab() {
|
pub fn move_focus_left_changes_tab() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ fn get_fake_os_input(fake_win_size: &PositionAndSize) -> FakeInputOutput {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn move_focus_right() {
|
pub fn move_focus_right() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -55,7 +55,7 @@ pub fn move_focus_right() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn move_focus_right_to_the_most_recently_used_pane() {
|
pub fn move_focus_right_to_the_most_recently_used_pane() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -92,7 +92,7 @@ pub fn move_focus_right_to_the_most_recently_used_pane() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn move_focus_right_changes_tab() {
|
pub fn move_focus_right_changes_tab() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ fn get_fake_os_input(fake_win_size: &PositionAndSize) -> FakeInputOutput {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn move_focus_up() {
|
pub fn move_focus_up() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -53,7 +53,7 @@ pub fn move_focus_up() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn move_focus_up_to_the_most_recently_used_pane() {
|
pub fn move_focus_up_to_the_most_recently_used_pane() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ pub fn resize_down_with_pane_above() {
|
||||||
// └───────────┘ └───────────┘
|
// └───────────┘ └───────────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -73,7 +73,7 @@ pub fn resize_down_with_pane_below() {
|
||||||
// └───────────┘ └───────────┘
|
// └───────────┘ └───────────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -122,7 +122,7 @@ pub fn resize_down_with_panes_above_and_below() {
|
||||||
// └───────────┘ └───────────┘
|
// └───────────┘ └───────────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 25,
|
rows: 25,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -169,7 +169,7 @@ pub fn resize_down_with_multiple_panes_above() {
|
||||||
// └───────────┘ └───────────┘
|
// └───────────┘ └───────────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -219,7 +219,7 @@ pub fn resize_down_with_panes_above_aligned_left_with_current_pane() {
|
||||||
// └─────┴─────┘ └─────┴─────┘
|
// └─────┴─────┘ └─────┴─────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -271,7 +271,7 @@ pub fn resize_down_with_panes_below_aligned_left_with_current_pane() {
|
||||||
// └─────┴─────┘ └─────┴─────┘
|
// └─────┴─────┘ └─────┴─────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -322,7 +322,7 @@ pub fn resize_down_with_panes_above_aligned_right_with_current_pane() {
|
||||||
// └─────┴─────┘ └─────┴─────┘
|
// └─────┴─────┘ └─────┴─────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -371,7 +371,7 @@ pub fn resize_down_with_panes_below_aligned_right_with_current_pane() {
|
||||||
// └─────┴─────┘ └─────┴─────┘
|
// └─────┴─────┘ └─────┴─────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -421,7 +421,7 @@ pub fn resize_down_with_panes_above_aligned_left_and_right_with_current_pane() {
|
||||||
// └───┴───┴───┘ └───┴───┴───┘
|
// └───┴───┴───┘ └───┴───┴───┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -475,7 +475,7 @@ pub fn resize_down_with_panes_below_aligned_left_and_right_with_current_pane() {
|
||||||
// └───┴───┴───┘ └───┴───┴───┘
|
// └───┴───┴───┘ └───┴───┴───┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -531,7 +531,7 @@ pub fn resize_down_with_panes_above_aligned_left_and_right_with_panes_to_the_lef
|
||||||
// └─┴─┴───┴─┴─┘ └─┴─┴───┴─┴─┘
|
// └─┴─┴───┴─┴─┘ └─┴─┴───┴─┴─┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 40,
|
rows: 40,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -605,7 +605,7 @@ pub fn resize_down_with_panes_below_aligned_left_and_right_with_to_the_left_and_
|
||||||
// └─┴───────┴─┘ └─┴───────┴─┘
|
// └─┴───────┴─┘ └─┴───────┴─┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 40,
|
rows: 40,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -678,7 +678,7 @@ pub fn cannot_resize_down_when_pane_below_is_at_minimum_height() {
|
||||||
// └───────────┘ └───────────┘
|
// └───────────┘ └───────────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 7,
|
rows: 7,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ pub fn resize_left_with_pane_to_the_left() {
|
||||||
// └─────┴─────┘ └───┴───────┘
|
// └─────┴─────┘ └───┴───────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -67,7 +67,7 @@ pub fn resize_left_with_pane_to_the_right() {
|
||||||
// └─────┴─────┘ └───┴───────┘
|
// └─────┴─────┘ └───┴───────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -110,7 +110,7 @@ pub fn resize_left_with_panes_to_the_left_and_right() {
|
||||||
// └─────┴─────┴─────┘ └─────┴───┴───────┘
|
// └─────┴─────┴─────┘ └─────┴───┴───────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -155,7 +155,7 @@ pub fn resize_left_with_multiple_panes_to_the_left() {
|
||||||
// └─────┴─────┘ └───┴───────┘
|
// └─────┴─────┘ └───┴───────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -203,7 +203,7 @@ pub fn resize_left_with_panes_to_the_left_aligned_top_with_current_pane() {
|
||||||
// └─────┴─────┘ └───┴───────┘
|
// └─────┴─────┘ └───┴───────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -253,7 +253,7 @@ pub fn resize_left_with_panes_to_the_right_aligned_top_with_current_pane() {
|
||||||
// └─────┴─────┘ └───┴───────┘
|
// └─────┴─────┘ └───┴───────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -300,7 +300,7 @@ pub fn resize_left_with_panes_to_the_left_aligned_bottom_with_current_pane() {
|
||||||
// └─────┴─────┘ └─────┴─────┘
|
// └─────┴─────┘ └─────┴─────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -349,7 +349,7 @@ pub fn resize_left_with_panes_to_the_right_aligned_bottom_with_current_pane() {
|
||||||
// └─────┴─────┘ └─────┴─────┘
|
// └─────┴─────┘ └─────┴─────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -399,7 +399,7 @@ pub fn resize_left_with_panes_to_the_left_aligned_top_and_bottom_with_current_pa
|
||||||
// └─────┴─────┘ └─────┴─────┘
|
// └─────┴─────┘ └─────┴─────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -453,7 +453,7 @@ pub fn resize_left_with_panes_to_the_right_aligned_top_and_bottom_with_current_p
|
||||||
// └─────┴─────┘ └─────┴─────┘
|
// └─────┴─────┘ └─────┴─────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -509,7 +509,7 @@ pub fn resize_left_with_panes_to_the_left_aligned_top_and_bottom_with_panes_abov
|
||||||
// └─────┴─────┘ └─────┴─────┘
|
// └─────┴─────┘ └─────┴─────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 40,
|
rows: 40,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -583,7 +583,7 @@ pub fn resize_left_with_panes_to_the_right_aligned_top_and_bottom_with_panes_abo
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
// TODO: combine with above
|
// TODO: combine with above
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 40,
|
rows: 40,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -655,7 +655,7 @@ pub fn cannot_resize_left_when_pane_to_the_left_is_at_minimum_width() {
|
||||||
// └─┴─┘ └─┴─┘
|
// └─┴─┘ └─┴─┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 9,
|
cols: 9,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ pub fn resize_right_with_pane_to_the_left() {
|
||||||
// └─────┴─────┘ └───────┴───┘
|
// └─────┴─────┘ └───────┴───┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -67,7 +67,7 @@ pub fn resize_right_with_pane_to_the_right() {
|
||||||
// └─────┴─────┘ └───────┴───┘
|
// └─────┴─────┘ └───────┴───┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -110,7 +110,7 @@ pub fn resize_right_with_panes_to_the_left_and_right() {
|
||||||
// └─────┴─────┴─────┘ └─────┴───────┴───┘
|
// └─────┴─────┴─────┘ └─────┴───────┴───┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -155,7 +155,7 @@ pub fn resize_right_with_multiple_panes_to_the_left() {
|
||||||
// └─────┴─────┘ └───────┴───┘
|
// └─────┴─────┘ └───────┴───┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -203,7 +203,7 @@ pub fn resize_right_with_panes_to_the_left_aligned_top_with_current_pane() {
|
||||||
// └─────┴─────┘ └───────┴───┘
|
// └─────┴─────┘ └───────┴───┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -253,7 +253,7 @@ pub fn resize_right_with_panes_to_the_right_aligned_top_with_current_pane() {
|
||||||
// └─────┴─────┘ └───────┴───┘
|
// └─────┴─────┘ └───────┴───┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -300,7 +300,7 @@ pub fn resize_right_with_panes_to_the_left_aligned_bottom_with_current_pane() {
|
||||||
// └─────┴─────┘ └─────┴─────┘
|
// └─────┴─────┘ └─────┴─────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -349,7 +349,7 @@ pub fn resize_right_with_panes_to_the_right_aligned_bottom_with_current_pane() {
|
||||||
// └─────┴─────┘ └─────┴─────┘
|
// └─────┴─────┘ └─────┴─────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -399,7 +399,7 @@ pub fn resize_right_with_panes_to_the_left_aligned_top_and_bottom_with_current_p
|
||||||
// └─────┴─────┘ └─────┴─────┘
|
// └─────┴─────┘ └─────┴─────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -453,7 +453,7 @@ pub fn resize_right_with_panes_to_the_right_aligned_top_and_bottom_with_current_
|
||||||
// └─────┴─────┘ └─────┴─────┘
|
// └─────┴─────┘ └─────┴─────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -509,7 +509,7 @@ pub fn resize_right_with_panes_to_the_left_aligned_top_and_bottom_with_panes_abo
|
||||||
// └─────┴─────┘ └─────┴─────┘
|
// └─────┴─────┘ └─────┴─────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 40,
|
rows: 40,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -582,7 +582,7 @@ pub fn resize_right_with_panes_to_the_right_aligned_top_and_bottom_with_panes_ab
|
||||||
// └─────┴─────┘ └─────┴─────┘
|
// └─────┴─────┘ └─────┴─────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 40,
|
rows: 40,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -654,7 +654,7 @@ pub fn cannot_resize_right_when_pane_to_the_left_is_at_minimum_width() {
|
||||||
// └─┴─┘ └─┴─┘
|
// └─┴─┘ └─┴─┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 9,
|
cols: 9,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ pub fn resize_up_with_pane_above() {
|
||||||
// └───────────┘ └───────────┘
|
// └───────────┘ └───────────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -71,7 +71,7 @@ pub fn resize_up_with_pane_below() {
|
||||||
// └───────────┘ └───────────┘
|
// └───────────┘ └───────────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -119,7 +119,7 @@ pub fn resize_up_with_panes_above_and_below() {
|
||||||
// └───────────┘ └───────────┘
|
// └───────────┘ └───────────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -165,7 +165,7 @@ pub fn resize_up_with_multiple_panes_above() {
|
||||||
// └───────────┘ └───────────┘
|
// └───────────┘ └───────────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -213,7 +213,7 @@ pub fn resize_up_with_panes_above_aligned_left_with_current_pane() {
|
||||||
// └─────┴─────┘ └─────┴─────┘
|
// └─────┴─────┘ └─────┴─────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -265,7 +265,7 @@ pub fn resize_up_with_panes_below_aligned_left_with_current_pane() {
|
||||||
// └─────┴─────┘ └─────┴─────┘
|
// └─────┴─────┘ └─────┴─────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -316,7 +316,7 @@ pub fn resize_up_with_panes_above_aligned_right_with_current_pane() {
|
||||||
// └─────┴─────┘ └─────┴─────┘
|
// └─────┴─────┘ └─────┴─────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -365,7 +365,7 @@ pub fn resize_up_with_panes_below_aligned_right_with_current_pane() {
|
||||||
// └─────┴─────┘ └─────┴─────┘
|
// └─────┴─────┘ └─────┴─────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -415,7 +415,7 @@ pub fn resize_up_with_panes_above_aligned_left_and_right_with_current_pane() {
|
||||||
// └───┴───┴───┘ └───┴───┴───┘
|
// └───┴───┴───┘ └───┴───┴───┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -469,7 +469,7 @@ pub fn resize_up_with_panes_below_aligned_left_and_right_with_current_pane() {
|
||||||
// └───┴───┴───┘ └───┴───┴───┘
|
// └───┴───┴───┘ └───┴───┴───┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -525,7 +525,7 @@ pub fn resize_up_with_panes_above_aligned_left_and_right_with_panes_to_the_left_
|
||||||
// └─┴─┴───┴─┴─┘ └─┴─┴───┴─┴─┘
|
// └─┴─┴───┴─┴─┘ └─┴─┴───┴─┴─┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 40,
|
rows: 40,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -599,7 +599,7 @@ pub fn resize_up_with_panes_below_aligned_left_and_right_with_to_the_left_and_ri
|
||||||
// └─┴───────┴─┘ └─┴───────┴─┘
|
// └─┴───────┴─┘ └─┴───────┴─┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 40,
|
rows: 40,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -672,7 +672,7 @@ pub fn cannot_resize_up_when_pane_above_is_at_minimum_height() {
|
||||||
// └───────────┘ └───────────┘
|
// └───────────┘ └───────────┘
|
||||||
// █ == focused pane
|
// █ == focused pane
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 7,
|
rows: 7,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ fn get_fake_os_input(fake_win_size: &PositionAndSize) -> FakeInputOutput {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn open_new_tab() {
|
pub fn open_new_tab() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -56,7 +56,7 @@ pub fn open_new_tab() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn switch_to_prev_tab() {
|
pub fn switch_to_prev_tab() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -92,7 +92,7 @@ pub fn switch_to_prev_tab() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn switch_to_next_tab() {
|
pub fn switch_to_next_tab() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -128,7 +128,7 @@ pub fn switch_to_next_tab() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn close_tab() {
|
pub fn close_tab() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -164,7 +164,7 @@ pub fn close_tab() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn close_last_pane_in_a_tab() {
|
pub fn close_last_pane_in_a_tab() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -201,7 +201,7 @@ pub fn close_last_pane_in_a_tab() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn close_the_middle_tab() {
|
pub fn close_the_middle_tab() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -240,7 +240,7 @@ pub fn close_the_middle_tab() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn close_the_tab_that_has_a_pane_in_fullscreen() {
|
pub fn close_the_tab_that_has_a_pane_in_fullscreen() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -284,7 +284,7 @@ pub fn close_the_tab_that_has_a_pane_in_fullscreen() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn closing_last_tab_exits_the_app() {
|
pub fn closing_last_tab_exits_the_app() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ fn get_fake_os_input(fake_win_size: &PositionAndSize) -> FakeInputOutput {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn window_width_decrease_with_one_pane() {
|
pub fn window_width_decrease_with_one_pane() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -24,7 +24,7 @@ pub fn window_width_decrease_with_one_pane() {
|
||||||
let mut fake_input_output = get_fake_os_input(&fake_win_size);
|
let mut fake_input_output = get_fake_os_input(&fake_win_size);
|
||||||
fake_input_output.add_terminal_input(&[&QUIT]);
|
fake_input_output.add_terminal_input(&[&QUIT]);
|
||||||
fake_input_output.add_sigwinch_event(PositionAndSize {
|
fake_input_output.add_sigwinch_event(PositionAndSize {
|
||||||
columns: 90,
|
cols: 90,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -51,7 +51,7 @@ pub fn window_width_decrease_with_one_pane() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn window_width_increase_with_one_pane() {
|
pub fn window_width_increase_with_one_pane() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -60,7 +60,7 @@ pub fn window_width_increase_with_one_pane() {
|
||||||
let mut fake_input_output = get_fake_os_input(&fake_win_size);
|
let mut fake_input_output = get_fake_os_input(&fake_win_size);
|
||||||
fake_input_output.add_terminal_input(&[&QUIT]);
|
fake_input_output.add_terminal_input(&[&QUIT]);
|
||||||
fake_input_output.add_sigwinch_event(PositionAndSize {
|
fake_input_output.add_sigwinch_event(PositionAndSize {
|
||||||
columns: 141,
|
cols: 141,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -87,7 +87,7 @@ pub fn window_width_increase_with_one_pane() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn window_height_increase_with_one_pane() {
|
pub fn window_height_increase_with_one_pane() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -96,7 +96,7 @@ pub fn window_height_increase_with_one_pane() {
|
||||||
let mut fake_input_output = get_fake_os_input(&fake_win_size);
|
let mut fake_input_output = get_fake_os_input(&fake_win_size);
|
||||||
fake_input_output.add_terminal_input(&[&QUIT]);
|
fake_input_output.add_terminal_input(&[&QUIT]);
|
||||||
fake_input_output.add_sigwinch_event(PositionAndSize {
|
fake_input_output.add_sigwinch_event(PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 30,
|
rows: 30,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -123,7 +123,7 @@ pub fn window_height_increase_with_one_pane() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn window_width_and_height_decrease_with_one_pane() {
|
pub fn window_width_and_height_decrease_with_one_pane() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -132,7 +132,7 @@ pub fn window_width_and_height_decrease_with_one_pane() {
|
||||||
let mut fake_input_output = get_fake_os_input(&fake_win_size);
|
let mut fake_input_output = get_fake_os_input(&fake_win_size);
|
||||||
fake_input_output.add_terminal_input(&[&QUIT]);
|
fake_input_output.add_terminal_input(&[&QUIT]);
|
||||||
fake_input_output.add_sigwinch_event(PositionAndSize {
|
fake_input_output.add_sigwinch_event(PositionAndSize {
|
||||||
columns: 90,
|
cols: 90,
|
||||||
rows: 10,
|
rows: 10,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ fn get_fake_os_input(fake_win_size: &PositionAndSize) -> FakeInputOutput {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn adding_new_terminal_in_fullscreen() {
|
pub fn adding_new_terminal_in_fullscreen() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
@ -54,7 +54,7 @@ pub fn adding_new_terminal_in_fullscreen() {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn move_focus_is_disabled_in_fullscreen() {
|
pub fn move_focus_is_disabled_in_fullscreen() {
|
||||||
let fake_win_size = PositionAndSize {
|
let fake_win_size = PositionAndSize {
|
||||||
columns: 121,
|
cols: 121,
|
||||||
rows: 20,
|
rows: 20,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ impl Pane for PluginPane {
|
||||||
fn columns(&self) -> usize {
|
fn columns(&self) -> usize {
|
||||||
self.position_and_size_override
|
self.position_and_size_override
|
||||||
.unwrap_or(self.position_and_size)
|
.unwrap_or(self.position_and_size)
|
||||||
.columns
|
.cols
|
||||||
}
|
}
|
||||||
fn reset_size_and_position_override(&mut self) {
|
fn reset_size_and_position_override(&mut self) {
|
||||||
self.position_and_size_override = None;
|
self.position_and_size_override = None;
|
||||||
|
|
@ -76,7 +76,7 @@ impl Pane for PluginPane {
|
||||||
x,
|
x,
|
||||||
y,
|
y,
|
||||||
rows: size.rows,
|
rows: size.rows,
|
||||||
columns: size.columns,
|
cols: size.cols,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
self.position_and_size_override = Some(position_and_size_override);
|
self.position_and_size_override = Some(position_and_size_override);
|
||||||
|
|
@ -117,7 +117,7 @@ impl Pane for PluginPane {
|
||||||
self.position_and_size.rows_fixed = true;
|
self.position_and_size.rows_fixed = true;
|
||||||
}
|
}
|
||||||
fn set_fixed_width(&mut self, fixed_width: usize) {
|
fn set_fixed_width(&mut self, fixed_width: usize) {
|
||||||
self.position_and_size.columns = fixed_width;
|
self.position_and_size.cols = fixed_width;
|
||||||
self.position_and_size.cols_fixed = true;
|
self.position_and_size.cols_fixed = true;
|
||||||
}
|
}
|
||||||
fn render(&mut self) -> Option<String> {
|
fn render(&mut self) -> Option<String> {
|
||||||
|
|
@ -167,20 +167,20 @@ impl Pane for PluginPane {
|
||||||
}
|
}
|
||||||
fn reduce_width_right(&mut self, count: usize) {
|
fn reduce_width_right(&mut self, count: usize) {
|
||||||
self.position_and_size.x += count;
|
self.position_and_size.x += count;
|
||||||
self.position_and_size.columns -= count;
|
self.position_and_size.cols -= count;
|
||||||
self.should_render = true;
|
self.should_render = true;
|
||||||
}
|
}
|
||||||
fn reduce_width_left(&mut self, count: usize) {
|
fn reduce_width_left(&mut self, count: usize) {
|
||||||
self.position_and_size.columns -= count;
|
self.position_and_size.cols -= count;
|
||||||
self.should_render = true;
|
self.should_render = true;
|
||||||
}
|
}
|
||||||
fn increase_width_left(&mut self, count: usize) {
|
fn increase_width_left(&mut self, count: usize) {
|
||||||
self.position_and_size.x -= count;
|
self.position_and_size.x -= count;
|
||||||
self.position_and_size.columns += count;
|
self.position_and_size.cols += count;
|
||||||
self.should_render = true;
|
self.should_render = true;
|
||||||
}
|
}
|
||||||
fn increase_width_right(&mut self, count: usize) {
|
fn increase_width_right(&mut self, count: usize) {
|
||||||
self.position_and_size.columns += count;
|
self.position_and_size.cols += count;
|
||||||
self.should_render = true;
|
self.should_render = true;
|
||||||
}
|
}
|
||||||
fn push_down(&mut self, count: usize) {
|
fn push_down(&mut self, count: usize) {
|
||||||
|
|
@ -215,7 +215,7 @@ impl Pane for PluginPane {
|
||||||
}
|
}
|
||||||
fn max_width(&self) -> Option<usize> {
|
fn max_width(&self) -> Option<usize> {
|
||||||
if self.position_and_size.cols_fixed {
|
if self.position_and_size.cols_fixed {
|
||||||
Some(self.position_and_size.columns)
|
Some(self.position_and_size.cols)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ impl Pane for TerminalPane {
|
||||||
x,
|
x,
|
||||||
y,
|
y,
|
||||||
rows: size.rows,
|
rows: size.rows,
|
||||||
columns: size.columns,
|
cols: size.cols,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
self.position_and_size_override = Some(position_and_size_override);
|
self.position_and_size_override = Some(position_and_size_override);
|
||||||
|
|
@ -139,7 +139,7 @@ impl Pane for TerminalPane {
|
||||||
self.position_and_size.rows_fixed = true;
|
self.position_and_size.rows_fixed = true;
|
||||||
}
|
}
|
||||||
fn set_fixed_width(&mut self, fixed_width: usize) {
|
fn set_fixed_width(&mut self, fixed_width: usize) {
|
||||||
self.position_and_size.columns = fixed_width;
|
self.position_and_size.cols = fixed_width;
|
||||||
self.position_and_size.cols_fixed = true;
|
self.position_and_size.cols_fixed = true;
|
||||||
}
|
}
|
||||||
fn set_invisible_borders(&mut self, _invisible_borders: bool) {
|
fn set_invisible_borders(&mut self, _invisible_borders: bool) {
|
||||||
|
|
@ -217,20 +217,20 @@ impl Pane for TerminalPane {
|
||||||
}
|
}
|
||||||
fn reduce_width_right(&mut self, count: usize) {
|
fn reduce_width_right(&mut self, count: usize) {
|
||||||
self.position_and_size.x += count;
|
self.position_and_size.x += count;
|
||||||
self.position_and_size.columns -= count;
|
self.position_and_size.cols -= count;
|
||||||
self.reflow_lines();
|
self.reflow_lines();
|
||||||
}
|
}
|
||||||
fn reduce_width_left(&mut self, count: usize) {
|
fn reduce_width_left(&mut self, count: usize) {
|
||||||
self.position_and_size.columns -= count;
|
self.position_and_size.cols -= count;
|
||||||
self.reflow_lines();
|
self.reflow_lines();
|
||||||
}
|
}
|
||||||
fn increase_width_left(&mut self, count: usize) {
|
fn increase_width_left(&mut self, count: usize) {
|
||||||
self.position_and_size.x -= count;
|
self.position_and_size.x -= count;
|
||||||
self.position_and_size.columns += count;
|
self.position_and_size.cols += count;
|
||||||
self.reflow_lines();
|
self.reflow_lines();
|
||||||
}
|
}
|
||||||
fn increase_width_right(&mut self, count: usize) {
|
fn increase_width_right(&mut self, count: usize) {
|
||||||
self.position_and_size.columns += count;
|
self.position_and_size.cols += count;
|
||||||
self.reflow_lines();
|
self.reflow_lines();
|
||||||
}
|
}
|
||||||
fn push_down(&mut self, count: usize) {
|
fn push_down(&mut self, count: usize) {
|
||||||
|
|
@ -282,7 +282,7 @@ impl Pane for TerminalPane {
|
||||||
|
|
||||||
impl TerminalPane {
|
impl TerminalPane {
|
||||||
pub fn new(pid: RawFd, position_and_size: PositionAndSize, palette: Palette) -> TerminalPane {
|
pub fn new(pid: RawFd, position_and_size: PositionAndSize, palette: Palette) -> TerminalPane {
|
||||||
let grid = Grid::new(position_and_size.rows, position_and_size.columns, palette);
|
let grid = Grid::new(position_and_size.rows, position_and_size.cols, palette);
|
||||||
TerminalPane {
|
TerminalPane {
|
||||||
pid,
|
pid,
|
||||||
grid,
|
grid,
|
||||||
|
|
@ -308,8 +308,8 @@ impl TerminalPane {
|
||||||
}
|
}
|
||||||
pub fn get_columns(&self) -> usize {
|
pub fn get_columns(&self) -> usize {
|
||||||
match &self.position_and_size_override.as_ref() {
|
match &self.position_and_size_override.as_ref() {
|
||||||
Some(position_and_size_override) => position_and_size_override.columns,
|
Some(position_and_size_override) => position_and_size_override.cols,
|
||||||
None => self.position_and_size.columns as usize,
|
None => self.position_and_size.cols as usize,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub fn get_rows(&self) -> usize {
|
pub fn get_rows(&self) -> usize {
|
||||||
|
|
|
||||||
|
|
@ -33,16 +33,16 @@ const MIN_TERMINAL_WIDTH: usize = 4;
|
||||||
type BorderAndPaneIds = (usize, Vec<PaneId>);
|
type BorderAndPaneIds = (usize, Vec<PaneId>);
|
||||||
|
|
||||||
fn split_vertically_with_gap(rect: &PositionAndSize) -> (PositionAndSize, PositionAndSize) {
|
fn split_vertically_with_gap(rect: &PositionAndSize) -> (PositionAndSize, PositionAndSize) {
|
||||||
let width_of_each_half = (rect.columns - 1) / 2;
|
let width_of_each_half = (rect.cols - 1) / 2;
|
||||||
let mut first_rect = *rect;
|
let mut first_rect = *rect;
|
||||||
let mut second_rect = *rect;
|
let mut second_rect = *rect;
|
||||||
if rect.columns % 2 == 0 {
|
if rect.cols % 2 == 0 {
|
||||||
first_rect.columns = width_of_each_half + 1;
|
first_rect.cols = width_of_each_half + 1;
|
||||||
} else {
|
} else {
|
||||||
first_rect.columns = width_of_each_half;
|
first_rect.cols = width_of_each_half;
|
||||||
}
|
}
|
||||||
second_rect.x = first_rect.x + first_rect.columns + 1;
|
second_rect.x = first_rect.x + first_rect.cols + 1;
|
||||||
second_rect.columns = width_of_each_half;
|
second_rect.cols = width_of_each_half;
|
||||||
(first_rect, second_rect)
|
(first_rect, second_rect)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -280,7 +280,7 @@ impl Tab {
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
rows: self.full_screen_ws.rows,
|
rows: self.full_screen_ws.rows,
|
||||||
columns: self.full_screen_ws.columns,
|
cols: self.full_screen_ws.cols,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
self.panes_to_hide.clear();
|
self.panes_to_hide.clear();
|
||||||
|
|
@ -295,7 +295,7 @@ impl Tab {
|
||||||
terminal_pane.change_pos_and_size(&position_and_size);
|
terminal_pane.change_pos_and_size(&position_and_size);
|
||||||
self.os_api.set_terminal_size_using_fd(
|
self.os_api.set_terminal_size_using_fd(
|
||||||
*pid,
|
*pid,
|
||||||
position_and_size.columns as u16,
|
position_and_size.cols as u16,
|
||||||
position_and_size.rows as u16,
|
position_and_size.rows as u16,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -400,7 +400,7 @@ impl Tab {
|
||||||
let terminal_to_split = self.panes.get_mut(&terminal_id_to_split).unwrap();
|
let terminal_to_split = self.panes.get_mut(&terminal_id_to_split).unwrap();
|
||||||
let terminal_ws = PositionAndSize {
|
let terminal_ws = PositionAndSize {
|
||||||
rows: terminal_to_split.rows(),
|
rows: terminal_to_split.rows(),
|
||||||
columns: terminal_to_split.columns(),
|
cols: terminal_to_split.columns(),
|
||||||
x: terminal_to_split.x(),
|
x: terminal_to_split.x(),
|
||||||
y: terminal_to_split.y(),
|
y: terminal_to_split.y(),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
|
@ -413,7 +413,7 @@ impl Tab {
|
||||||
let new_terminal = TerminalPane::new(term_pid, bottom_winsize, self.colors);
|
let new_terminal = TerminalPane::new(term_pid, bottom_winsize, self.colors);
|
||||||
self.os_api.set_terminal_size_using_fd(
|
self.os_api.set_terminal_size_using_fd(
|
||||||
new_terminal.pid,
|
new_terminal.pid,
|
||||||
bottom_winsize.columns as u16,
|
bottom_winsize.cols as u16,
|
||||||
bottom_winsize.rows as u16,
|
bottom_winsize.rows as u16,
|
||||||
);
|
);
|
||||||
terminal_to_split.change_pos_and_size(&top_winsize);
|
terminal_to_split.change_pos_and_size(&top_winsize);
|
||||||
|
|
@ -421,7 +421,7 @@ impl Tab {
|
||||||
if let PaneId::Terminal(terminal_id_to_split) = terminal_id_to_split {
|
if let PaneId::Terminal(terminal_id_to_split) = terminal_id_to_split {
|
||||||
self.os_api.set_terminal_size_using_fd(
|
self.os_api.set_terminal_size_using_fd(
|
||||||
terminal_id_to_split,
|
terminal_id_to_split,
|
||||||
top_winsize.columns as u16,
|
top_winsize.cols as u16,
|
||||||
top_winsize.rows as u16,
|
top_winsize.rows as u16,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -433,7 +433,7 @@ impl Tab {
|
||||||
let new_terminal = TerminalPane::new(term_pid, right_winsize, self.colors);
|
let new_terminal = TerminalPane::new(term_pid, right_winsize, self.colors);
|
||||||
self.os_api.set_terminal_size_using_fd(
|
self.os_api.set_terminal_size_using_fd(
|
||||||
new_terminal.pid,
|
new_terminal.pid,
|
||||||
right_winsize.columns as u16,
|
right_winsize.cols as u16,
|
||||||
right_winsize.rows as u16,
|
right_winsize.rows as u16,
|
||||||
);
|
);
|
||||||
terminal_to_split.change_pos_and_size(&left_winsize);
|
terminal_to_split.change_pos_and_size(&left_winsize);
|
||||||
|
|
@ -441,7 +441,7 @@ impl Tab {
|
||||||
if let PaneId::Terminal(terminal_id_to_split) = terminal_id_to_split {
|
if let PaneId::Terminal(terminal_id_to_split) = terminal_id_to_split {
|
||||||
self.os_api.set_terminal_size_using_fd(
|
self.os_api.set_terminal_size_using_fd(
|
||||||
terminal_id_to_split,
|
terminal_id_to_split,
|
||||||
left_winsize.columns as u16,
|
left_winsize.cols as u16,
|
||||||
left_winsize.rows as u16,
|
left_winsize.rows as u16,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -481,7 +481,7 @@ impl Tab {
|
||||||
x: active_pane.x(),
|
x: active_pane.x(),
|
||||||
y: active_pane.y(),
|
y: active_pane.y(),
|
||||||
rows: active_pane.rows(),
|
rows: active_pane.rows(),
|
||||||
columns: active_pane.columns(),
|
cols: active_pane.columns(),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
let (top_winsize, bottom_winsize) = split_horizontally_with_gap(&terminal_ws);
|
let (top_winsize, bottom_winsize) = split_horizontally_with_gap(&terminal_ws);
|
||||||
|
|
@ -491,7 +491,7 @@ impl Tab {
|
||||||
let new_terminal = TerminalPane::new(term_pid, bottom_winsize, self.colors);
|
let new_terminal = TerminalPane::new(term_pid, bottom_winsize, self.colors);
|
||||||
self.os_api.set_terminal_size_using_fd(
|
self.os_api.set_terminal_size_using_fd(
|
||||||
new_terminal.pid,
|
new_terminal.pid,
|
||||||
bottom_winsize.columns as u16,
|
bottom_winsize.cols as u16,
|
||||||
bottom_winsize.rows as u16,
|
bottom_winsize.rows as u16,
|
||||||
);
|
);
|
||||||
self.panes.insert(pid, Box::new(new_terminal));
|
self.panes.insert(pid, Box::new(new_terminal));
|
||||||
|
|
@ -499,7 +499,7 @@ impl Tab {
|
||||||
if let PaneId::Terminal(active_terminal_pid) = active_pane_id {
|
if let PaneId::Terminal(active_terminal_pid) = active_pane_id {
|
||||||
self.os_api.set_terminal_size_using_fd(
|
self.os_api.set_terminal_size_using_fd(
|
||||||
*active_terminal_pid,
|
*active_terminal_pid,
|
||||||
top_winsize.columns as u16,
|
top_winsize.cols as u16,
|
||||||
top_winsize.rows as u16,
|
top_winsize.rows as u16,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -538,7 +538,7 @@ impl Tab {
|
||||||
x: active_pane.x(),
|
x: active_pane.x(),
|
||||||
y: active_pane.y(),
|
y: active_pane.y(),
|
||||||
rows: active_pane.rows(),
|
rows: active_pane.rows(),
|
||||||
columns: active_pane.columns(),
|
cols: active_pane.columns(),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
let (left_winsize, right_winsize) = split_vertically_with_gap(&terminal_ws);
|
let (left_winsize, right_winsize) = split_vertically_with_gap(&terminal_ws);
|
||||||
|
|
@ -548,7 +548,7 @@ impl Tab {
|
||||||
let new_terminal = TerminalPane::new(term_pid, right_winsize, self.colors);
|
let new_terminal = TerminalPane::new(term_pid, right_winsize, self.colors);
|
||||||
self.os_api.set_terminal_size_using_fd(
|
self.os_api.set_terminal_size_using_fd(
|
||||||
new_terminal.pid,
|
new_terminal.pid,
|
||||||
right_winsize.columns as u16,
|
right_winsize.cols as u16,
|
||||||
right_winsize.rows as u16,
|
right_winsize.rows as u16,
|
||||||
);
|
);
|
||||||
self.panes.insert(pid, Box::new(new_terminal));
|
self.panes.insert(pid, Box::new(new_terminal));
|
||||||
|
|
@ -556,7 +556,7 @@ impl Tab {
|
||||||
if let PaneId::Terminal(active_terminal_pid) = active_pane_id {
|
if let PaneId::Terminal(active_terminal_pid) = active_pane_id {
|
||||||
self.os_api.set_terminal_size_using_fd(
|
self.os_api.set_terminal_size_using_fd(
|
||||||
*active_terminal_pid,
|
*active_terminal_pid,
|
||||||
left_winsize.columns as u16,
|
left_winsize.cols as u16,
|
||||||
left_winsize.rows as u16,
|
left_winsize.rows as u16,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -715,7 +715,7 @@ impl Tab {
|
||||||
}
|
}
|
||||||
let mut output = String::new();
|
let mut output = String::new();
|
||||||
let mut boundaries = Boundaries::new(
|
let mut boundaries = Boundaries::new(
|
||||||
self.full_screen_ws.columns as u16,
|
self.full_screen_ws.cols as u16,
|
||||||
self.full_screen_ws.rows as u16,
|
self.full_screen_ws.rows as u16,
|
||||||
);
|
);
|
||||||
let hide_cursor = "\u{1b}[?25l";
|
let hide_cursor = "\u{1b}[?25l";
|
||||||
|
|
@ -1126,7 +1126,7 @@ impl Tab {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// rightmost border aligned with a pane border above
|
// rightmost border aligned with a pane border above
|
||||||
let mut right_resize_border = self.full_screen_ws.columns;
|
let mut right_resize_border = self.full_screen_ws.cols;
|
||||||
for terminal in &terminals {
|
for terminal in &terminals {
|
||||||
let left_terminal_boundary = terminal.x();
|
let left_terminal_boundary = terminal.x();
|
||||||
if terminal_borders_above
|
if terminal_borders_above
|
||||||
|
|
@ -1204,7 +1204,7 @@ impl Tab {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// leftmost border aligned with a pane border above
|
// leftmost border aligned with a pane border above
|
||||||
let mut right_resize_border = self.full_screen_ws.columns;
|
let mut right_resize_border = self.full_screen_ws.cols;
|
||||||
for terminal in &terminals {
|
for terminal in &terminals {
|
||||||
let left_terminal_boundary = terminal.x();
|
let left_terminal_boundary = terminal.x();
|
||||||
if terminal_borders_below
|
if terminal_borders_below
|
||||||
|
|
@ -1546,7 +1546,7 @@ impl Tab {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
let mut new_pos_and_size_for_pane = pane.position_and_size();
|
let mut new_pos_and_size_for_pane = pane.position_and_size();
|
||||||
new_pos_and_size_for_pane.columns += increase_by;
|
new_pos_and_size_for_pane.cols += increase_by;
|
||||||
|
|
||||||
if let Some(panes_to_the_right) = self.pane_ids_directly_right_of(&pane_id) {
|
if let Some(panes_to_the_right) = self.pane_ids_directly_right_of(&pane_id) {
|
||||||
return panes_to_the_right.iter().all(|id| {
|
return panes_to_the_right.iter().all(|id| {
|
||||||
|
|
@ -1714,8 +1714,8 @@ impl Tab {
|
||||||
.resize(self.full_screen_ws, new_screen_size)
|
.resize(self.full_screen_ws, new_screen_size)
|
||||||
{
|
{
|
||||||
self.should_clear_display_before_rendering = true;
|
self.should_clear_display_before_rendering = true;
|
||||||
self.full_screen_ws.columns =
|
self.full_screen_ws.cols =
|
||||||
(self.full_screen_ws.columns as isize + column_difference) as usize;
|
(self.full_screen_ws.cols as isize + column_difference) as usize;
|
||||||
self.full_screen_ws.rows =
|
self.full_screen_ws.rows =
|
||||||
(self.full_screen_ws.rows as isize + row_difference) as usize;
|
(self.full_screen_ws.rows as isize + row_difference) as usize;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ fn split_space_to_parts_vertically(
|
||||||
let mut split_parts = Vec::new();
|
let mut split_parts = Vec::new();
|
||||||
let mut current_x_position = space_to_split.x;
|
let mut current_x_position = space_to_split.x;
|
||||||
let mut current_width = 0;
|
let mut current_width = 0;
|
||||||
let max_width = space_to_split.columns - (sizes.len() - 1); // minus space for gaps
|
let max_width = space_to_split.cols - (sizes.len() - 1); // minus space for gaps
|
||||||
|
|
||||||
let mut parts_to_grow = Vec::new();
|
let mut parts_to_grow = Vec::new();
|
||||||
|
|
||||||
|
|
@ -32,7 +32,7 @@ fn split_space_to_parts_vertically(
|
||||||
split_parts.push(PositionAndSize {
|
split_parts.push(PositionAndSize {
|
||||||
x: current_x_position,
|
x: current_x_position,
|
||||||
y: space_to_split.y,
|
y: space_to_split.y,
|
||||||
columns,
|
cols: columns,
|
||||||
rows: space_to_split.rows,
|
rows: space_to_split.rows,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
});
|
});
|
||||||
|
|
@ -51,11 +51,11 @@ fn split_space_to_parts_vertically(
|
||||||
for (idx, part) in split_parts.iter_mut().enumerate() {
|
for (idx, part) in split_parts.iter_mut().enumerate() {
|
||||||
part.x = current_x_position;
|
part.x = current_x_position;
|
||||||
if parts_to_grow.contains(&part.x) {
|
if parts_to_grow.contains(&part.x) {
|
||||||
part.columns = new_columns;
|
part.cols = new_columns;
|
||||||
last_flexible_index = idx;
|
last_flexible_index = idx;
|
||||||
}
|
}
|
||||||
current_width += part.columns;
|
current_width += part.cols;
|
||||||
current_x_position += part.columns + 1; // 1 for gap
|
current_x_position += part.cols + 1; // 1 for gap
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -63,7 +63,7 @@ fn split_space_to_parts_vertically(
|
||||||
// we have some extra space left, let's add it to the last flexible part
|
// we have some extra space left, let's add it to the last flexible part
|
||||||
let extra = max_width - current_width;
|
let extra = max_width - current_width;
|
||||||
let mut last_part = split_parts.get_mut(last_flexible_index).unwrap();
|
let mut last_part = split_parts.get_mut(last_flexible_index).unwrap();
|
||||||
last_part.columns += extra;
|
last_part.cols += extra;
|
||||||
for part in (&mut split_parts[last_flexible_index + 1..]).iter_mut() {
|
for part in (&mut split_parts[last_flexible_index + 1..]).iter_mut() {
|
||||||
part.x += extra;
|
part.x += extra;
|
||||||
}
|
}
|
||||||
|
|
@ -96,7 +96,7 @@ fn split_space_to_parts_horizontally(
|
||||||
split_parts.push(PositionAndSize {
|
split_parts.push(PositionAndSize {
|
||||||
x: space_to_split.x,
|
x: space_to_split.x,
|
||||||
y: current_y_position,
|
y: current_y_position,
|
||||||
columns: space_to_split.columns,
|
cols: space_to_split.cols,
|
||||||
rows,
|
rows,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -81,10 +81,10 @@ impl<'a> PaneResizer<'a> {
|
||||||
current_size: PositionAndSize,
|
current_size: PositionAndSize,
|
||||||
new_size: PositionAndSize,
|
new_size: PositionAndSize,
|
||||||
) -> Option<(isize, isize)> {
|
) -> Option<(isize, isize)> {
|
||||||
let col_delta = new_size.columns as isize - current_size.columns as isize;
|
let col_delta = new_size.cols as isize - current_size.cols as isize;
|
||||||
let row_delta = new_size.rows as isize - current_size.rows as isize;
|
let row_delta = new_size.rows as isize - current_size.rows as isize;
|
||||||
if col_delta != 0 {
|
if col_delta != 0 {
|
||||||
let spans = self.solve_direction(Direction::Horizontal, new_size.columns)?;
|
let spans = self.solve_direction(Direction::Horizontal, new_size.cols)?;
|
||||||
self.collapse_spans(&spans);
|
self.collapse_spans(&spans);
|
||||||
}
|
}
|
||||||
self.solver.reset();
|
self.solver.reset();
|
||||||
|
|
@ -162,7 +162,7 @@ impl<'a> PaneResizer<'a> {
|
||||||
direction,
|
direction,
|
||||||
fixed: pas.cols_fixed,
|
fixed: pas.cols_fixed,
|
||||||
pos: pas.x,
|
pos: pas.x,
|
||||||
size: pas.columns,
|
size: pas.cols,
|
||||||
pos_var,
|
pos_var,
|
||||||
size_var,
|
size_var,
|
||||||
},
|
},
|
||||||
|
|
@ -186,7 +186,7 @@ impl<'a> PaneResizer<'a> {
|
||||||
match span.direction {
|
match span.direction {
|
||||||
Direction::Horizontal => pane.change_pos_and_size(&PositionAndSize {
|
Direction::Horizontal => pane.change_pos_and_size(&PositionAndSize {
|
||||||
x: fetch_usize(span.pos_var),
|
x: fetch_usize(span.pos_var),
|
||||||
columns: fetch_usize(span.size_var),
|
cols: fetch_usize(span.size_var),
|
||||||
..pane.position_and_size()
|
..pane.position_and_size()
|
||||||
}),
|
}),
|
||||||
Direction::Vertical => pane.change_pos_and_size(&PositionAndSize {
|
Direction::Vertical => pane.change_pos_and_size(&PositionAndSize {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ pub struct PositionAndSize {
|
||||||
pub x: usize,
|
pub x: usize,
|
||||||
pub y: usize,
|
pub y: usize,
|
||||||
pub rows: usize,
|
pub rows: usize,
|
||||||
pub columns: usize,
|
pub cols: usize,
|
||||||
// FIXME: Honestly, these shouldn't exist and rows / columns should be enums like:
|
// FIXME: Honestly, these shouldn't exist and rows / columns should be enums like:
|
||||||
// Dimension::Flex(usize) / Dimension::Fixed(usize), but 400+ compiler errors is more than
|
// Dimension::Flex(usize) / Dimension::Fixed(usize), but 400+ compiler errors is more than
|
||||||
// I'm in the mood for right now...
|
// I'm in the mood for right now...
|
||||||
|
|
@ -19,7 +19,7 @@ pub struct PositionAndSize {
|
||||||
impl From<Winsize> for PositionAndSize {
|
impl From<Winsize> for PositionAndSize {
|
||||||
fn from(winsize: Winsize) -> PositionAndSize {
|
fn from(winsize: Winsize) -> PositionAndSize {
|
||||||
PositionAndSize {
|
PositionAndSize {
|
||||||
columns: winsize.ws_col as usize,
|
cols: winsize.ws_col as usize,
|
||||||
rows: winsize.ws_row as usize,
|
rows: winsize.ws_row as usize,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue