diff options
author | Brooks J Rady <b.j.rady@gmail.com> | 2021-06-03 12:38:23 +0100 |
---|---|---|
committer | Brooks J Rady <b.j.rady@gmail.com> | 2021-06-03 12:38:23 +0100 |
commit | 5164bd99b7750122b36fd1fa54a90047e483067c (patch) | |
tree | 52beb8ea26c8ec6a6d46c6a9a95c9661878f6ff0 | |
parent | 949971cc62c0406a56d9e74736de4678c62b8334 (diff) |
Fixed a build warning and renamed a struct field
23 files changed, 184 insertions, 186 deletions
diff --git a/default-plugins/tab-bar/src/main.rs b/default-plugins/tab-bar/src/main.rs index 7ff639e85..1f83dcde6 100644 --- a/default-plugins/tab-bar/src/main.rs +++ b/default-plugins/tab-bar/src/main.rs @@ -57,7 +57,6 @@ impl ZellijPlugin for State { let tab = tab_style( tabname, t.active, - t.position, t.is_sync_panes_active, self.mode_info.palette, self.mode_info.capabilities, diff --git a/default-plugins/tab-bar/src/tab.rs b/default-plugins/tab-bar/src/tab.rs index 7e83e85bb..9edfba13f 100644 --- a/default-plugins/tab-bar/src/tab.rs +++ b/default-plugins/tab-bar/src/tab.rs @@ -40,7 +40,6 @@ pub fn non_active_tab(text: String, palette: Palette, separator: &str) -> LinePa pub fn tab_style( text: String, is_active_tab: bool, - position: usize, is_sync_panes_active: bool, palette: Palette, capabilities: PluginCapabilities, diff --git a/src/tests/integration/basic.rs b/src/tests/integration/basic.rs index 640b1c553..155ff8b16 100644 --- a/src/tests/integration/basic.rs +++ b/src/tests/integration/basic.rs @@ -20,7 +20,7 @@ fn get_fake_os_input(fake_win_size: &PositionAndSize) -> FakeInputOutput { #[test] pub fn starts_with_one_terminal() { let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, @@ -48,7 +48,7 @@ pub fn starts_with_one_terminal() { #[test] pub fn split_terminals_vertically() { let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, @@ -76,7 +76,7 @@ pub fn split_terminals_vertically() { #[test] pub fn split_terminals_horizontally() { let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, @@ -105,7 +105,7 @@ pub fn split_terminals_horizontally() { pub fn split_largest_terminal() { // this finds the largest pane and splits along its longest edge (vertically or horizontally) let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, @@ -139,7 +139,7 @@ pub fn split_largest_terminal() { #[test] pub fn cannot_split_terminals_vertically_when_active_terminal_is_too_small() { let fake_win_size = PositionAndSize { - columns: 8, + cols: 8, rows: 20, x: 0, y: 0, @@ -167,7 +167,7 @@ pub fn cannot_split_terminals_vertically_when_active_terminal_is_too_small() { #[test] pub fn cannot_split_terminals_horizontally_when_active_terminal_is_too_small() { let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 4, x: 0, y: 0, @@ -195,7 +195,7 @@ pub fn cannot_split_terminals_horizontally_when_active_terminal_is_too_small() { #[test] pub fn cannot_split_largest_terminal_when_there_is_no_room() { let fake_win_size = PositionAndSize { - columns: 8, + cols: 8, rows: 4, x: 0, y: 0, @@ -223,7 +223,7 @@ pub fn cannot_split_largest_terminal_when_there_is_no_room() { #[test] pub fn scrolling_up_inside_a_pane() { let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, @@ -259,7 +259,7 @@ pub fn scrolling_up_inside_a_pane() { #[test] pub fn scrolling_down_inside_a_pane() { let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, @@ -297,7 +297,7 @@ pub fn scrolling_down_inside_a_pane() { #[test] pub fn scrolling_page_up_inside_a_pane() { let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, @@ -332,7 +332,7 @@ pub fn scrolling_page_up_inside_a_pane() { #[test] pub fn scrolling_page_down_inside_a_pane() { let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 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 // simultaneously, new panes beyond this limit will close older panes on screen let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, @@ -409,7 +409,7 @@ pub fn max_panes() { #[test] pub fn toggle_focused_pane_fullscreen() { let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 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 // past the block let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, diff --git a/src/tests/integration/close_pane.rs b/src/tests/integration/close_pane.rs index 598815145..afdc3f2ee 100644 --- a/src/tests/integration/close_pane.rs +++ b/src/tests/integration/close_pane.rs @@ -28,7 +28,7 @@ pub fn close_pane_with_another_pane_above_it() { // └───────────┘ └───────────┘ // █ == pane being closed let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, @@ -70,7 +70,7 @@ pub fn close_pane_with_another_pane_below_it() { // └───────────┘ └───────────┘ // █ == pane being closed let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, @@ -111,7 +111,7 @@ pub fn close_pane_with_another_pane_to_the_left() { // └─────┴─────┘ └──────────┘ // █ == pane being closed let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, @@ -151,7 +151,7 @@ pub fn close_pane_with_another_pane_to_the_right() { // └─────┴─────┘ └──────────┘ // █ == pane being closed let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, @@ -194,7 +194,7 @@ pub fn close_pane_with_multiple_panes_above_it() { // └───────────┘ └─────┴─────┘ // █ == pane being closed let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, @@ -240,7 +240,7 @@ pub fn close_pane_with_multiple_panes_below_it() { // └─────┴─────┘ └─────┴─────┘ // █ == pane being closed let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, @@ -284,7 +284,7 @@ pub fn close_pane_with_multiple_panes_to_the_left() { // └─────┴─────┘ └──────────┘ // █ == pane being closed let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, @@ -330,7 +330,7 @@ pub fn close_pane_with_multiple_panes_to_the_right() { // └─────┴─────┘ └──────────┘ // █ == pane being closed let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, @@ -374,7 +374,7 @@ pub fn close_pane_with_multiple_panes_above_it_away_from_screen_edges() { // └───┴───────┴───┘ └───┴───┴───┴───┘ // █ == pane being closed let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, @@ -441,7 +441,7 @@ pub fn close_pane_with_multiple_panes_below_it_away_from_screen_edges() { // └───┴───┴───┴───┘ └───┴───┴───┴───┘ // █ == pane being closed let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, @@ -506,7 +506,7 @@ pub fn close_pane_with_multiple_panes_to_the_left_away_from_screen_edges() { // └────┴──────┘ └────┴──────┘ // █ == pane being closed let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 30, x: 0, y: 0, @@ -571,7 +571,7 @@ pub fn close_pane_with_multiple_panes_to_the_right_away_from_screen_edges() { // └────┴──────┘ └────┴──────┘ // █ == pane being closed let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 30, x: 0, y: 0, @@ -626,7 +626,7 @@ pub fn close_pane_with_multiple_panes_to_the_right_away_from_screen_edges() { #[test] pub fn closing_last_pane_exits_app() { let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, diff --git a/src/tests/integration/compatibility.rs b/src/tests/integration/compatibility.rs index ec983b095..06a409ff5 100644 --- a/src/tests/integration/compatibility.rs +++ b/src/tests/integration/compatibility.rs @@ -27,14 +27,14 @@ use zellij_utils::input::config::Config; fn get_fake_os_input(fake_win_size: &PositionAndSize, fixture_name: &str) -> FakeInputOutput { let mut tty_inputs = HashMap::new(); 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) } #[test] pub fn run_bandwhich_from_fish_shell() { let fake_win_size = PositionAndSize { - columns: 116, + cols: 116, rows: 28, x: 0, y: 0, @@ -64,7 +64,7 @@ pub fn run_bandwhich_from_fish_shell() { #[test] pub fn fish_tab_completion_options() { let fake_win_size = PositionAndSize { - columns: 116, + cols: 116, rows: 28, x: 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, // but we can see the command line change and the cursor staying in place let fake_win_size = PositionAndSize { - columns: 116, + cols: 116, rows: 28, x: 0, y: 0, @@ -136,7 +136,7 @@ pub fn vim_scroll_region_down() { // file // experience appear to the user let fake_win_size = PositionAndSize { - columns: 116, + cols: 116, rows: 28, x: 0, y: 0, @@ -171,7 +171,7 @@ pub fn vim_ctrl_d() { // end of the scroll region // vim makes sure to fill these empty lines with the rest of the file let fake_win_size = PositionAndSize { - columns: 116, + cols: 116, rows: 28, x: 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 // file above the current content) let fake_win_size = PositionAndSize { - columns: 116, + cols: 116, rows: 28, x: 0, y: 0, @@ -234,7 +234,7 @@ pub fn vim_ctrl_u() { #[test] pub fn htop() { let fake_win_size = PositionAndSize { - columns: 116, + cols: 116, rows: 28, x: 0, y: 0, @@ -263,7 +263,7 @@ pub fn htop() { #[test] pub fn htop_scrolling() { let fake_win_size = PositionAndSize { - columns: 116, + cols: 116, rows: 28, x: 0, y: 0, @@ -292,7 +292,7 @@ pub fn htop_scrolling() { #[test] pub fn htop_right_scrolling() { let fake_win_size = PositionAndSize { - columns: 116, + cols: 116, rows: 28, x: 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 // * if everything looks fine, this test passed :) let fake_win_size = PositionAndSize { - columns: 116, + cols: 116, rows: 28, x: 0, y: 0, @@ -361,7 +361,7 @@ pub fn clear_scroll_region() { // this means that when vim exits, we get back the previous scroll // buffer let fake_win_size = PositionAndSize { - columns: 116, + cols: 116, rows: 28, x: 0, y: 0, @@ -390,7 +390,7 @@ pub fn clear_scroll_region() { #[test] pub fn display_tab_characters_properly() { let fake_win_size = PositionAndSize { - columns: 116, + cols: 116, rows: 28, x: 0, y: 0, @@ -419,7 +419,7 @@ pub fn display_tab_characters_properly() { #[test] pub fn neovim_insert_mode() { let fake_win_size = PositionAndSize { - columns: 116, + cols: 116, rows: 28, x: 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 // immediately goes down one line let fake_win_size = PositionAndSize { - columns: 116, + cols: 116, rows: 28, x: 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 // going up and changing the colors of our line-wrapped pasted text let fake_win_size = PositionAndSize { - columns: 149, + cols: 149, rows: 28, x: 0, y: 0, @@ -510,7 +510,7 @@ pub fn fish_paste_multiline() { #[test] pub fn git_log() { let fake_win_size = PositionAndSize { - columns: 149, + cols: 149, rows: 28, x: 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 // we are able to scroll up let fake_win_size = PositionAndSize { - columns: 149, + cols: 149, rows: 28, x: 0, y: 0, @@ -570,7 +570,7 @@ pub fn git_diff_scrollup() { #[test] pub fn emacs_longbuf() { let fake_win_size = PositionAndSize { - columns: 284, + cols: 284, rows: 60, x: 0, y: 0, @@ -599,7 +599,7 @@ pub fn emacs_longbuf() { #[test] pub fn top_and_quit() { let fake_win_size = PositionAndSize { - columns: 235, + cols: 235, rows: 56, x: 0, y: 0, @@ -634,7 +634,7 @@ pub fn exa_plus_omf_theme() { // over existing on-screen content without deleting it, so we must // convert it to spaces let fake_win_size = PositionAndSize { - columns: 235, + cols: 235, rows: 56, x: 0, y: 0, diff --git a/src/tests/integration/layouts.rs b/src/tests/integration/layouts.rs index e69869249..0572de6cd 100644 --- a/src/tests/integration/layouts.rs +++ b/src/tests/integration/layouts.rs @@ -16,7 +16,7 @@ fn get_fake_os_input(fake_win_size: &PositionAndSize) -> FakeInputOutput { #[test] pub fn accepts_basic_layout() { let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, diff --git a/src/tests/integration/move_focus_down.rs b/src/tests/integration/move_focus_down.rs index 2f18ab623..5f3afc6e0 100644 --- a/src/tests/integration/move_focus_down.rs +++ b/src/tests/integration/move_focus_down.rs @@ -19,7 +19,7 @@ fn get_fake_os_input(fake_win_size: &PositionAndSize) -> FakeInputOutput { #[test] pub fn move_focus_down() { let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, @@ -54,7 +54,7 @@ pub fn move_focus_down() { #[test] pub fn move_focus_down_to_the_most_recently_used_pane() { let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, diff --git a/src/tests/integration/move_focus_left.rs b/src/tests/integration/move_focus_left.rs index a9fca49ed..32c93770c 100644 --- a/src/tests/integration/move_focus_left.rs +++ b/src/tests/integration/move_focus_left.rs @@ -20,7 +20,7 @@ fn get_fake_os_input(fake_win_size: &PositionAndSize) -> FakeInputOutput { #[test] pub fn move_focus_left() { let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, @@ -54,7 +54,7 @@ pub fn move_focus_left() { #[test] pub fn move_focus_left_to_the_most_recently_used_pane() { let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, @@ -92,7 +92,7 @@ pub fn move_focus_left_to_the_most_recently_used_pane() { #[test] pub fn move_focus_left_changes_tab() { let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, diff --git a/src/tests/integration/move_focus_right.rs b/src/tests/integration/move_focus_right.rs index c85d5b96e..370fdcbf3 100644 --- a/src/tests/integration/move_focus_right.rs +++ b/src/tests/integration/move_focus_right.rs @@ -20,7 +20,7 @@ fn get_fake_os_input(fake_win_size: &PositionAndSize) -> FakeInputOutput { #[test] pub fn move_focus_right() { let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, @@ -55,7 +55,7 @@ pub fn move_focus_right() { #[test] pub fn move_focus_right_to_the_most_recently_used_pane() { let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, @@ -92,7 +92,7 @@ pub fn move_focus_right_to_the_most_recently_used_pane() { #[test] pub fn move_focus_right_changes_tab() { let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, diff --git a/src/tests/integration/move_focus_up.rs b/src/tests/integration/move_focus_up.rs index d161ff8a4..1111660c0 100644 --- a/src/tests/integration/move_focus_up.rs +++ b/src/tests/integration/move_focus_up.rs @@ -19,7 +19,7 @@ fn get_fake_os_input(fake_win_size: &PositionAndSize) -> FakeInputOutput { #[test] pub fn move_focus_up() { let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, @@ -53,7 +53,7 @@ pub fn move_focus_up() { #[test] pub fn move_focus_up_to_the_most_recently_used_pane() { let fake_win_size = PositionAndSize { - columns: 121, + cols: 121, rows: 20, x: 0, y: 0, diff --git a/src/t |