From f5b781c66f0a541e6382d2fef444470a87273c53 Mon Sep 17 00:00:00 2001 From: Dante Pippi <6619666+dantepippi@users.noreply.github.com> Date: Tue, 20 Apr 2021 23:58:38 -0300 Subject: [PATCH 1/3] Adding field active_at and using it to sort panes Using last activity time to determine which pane was previously active when moving back to a direction. Changing active_at type to Instant --- src/client/panes/plugin_pane.rs | 15 +++++++++++++-- src/client/panes/terminal_pane.rs | 11 +++++++++++ src/client/tab.rs | 12 ++++++++---- 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/src/client/panes/plugin_pane.rs b/src/client/panes/plugin_pane.rs index a5b99bb556..21480ac227 100644 --- a/src/client/panes/plugin_pane.rs +++ b/src/client/panes/plugin_pane.rs @@ -1,9 +1,10 @@ use crate::{common::SenderWithContext, pty_bus::VteBytes, tab::Pane, wasm_vm::PluginInstruction}; -use std::{sync::mpsc::channel, unimplemented}; - use crate::panes::{PaneId, PositionAndSize}; +use std::time::Instant; +use std::{sync::mpsc::channel, unimplemented}; + pub struct PluginPane { pub pid: u32, pub should_render: bool, @@ -14,6 +15,7 @@ pub struct PluginPane { pub send_plugin_instructions: SenderWithContext, pub max_height: Option, pub max_width: Option, + pub active_at: Instant, } impl PluginPane { @@ -32,6 +34,7 @@ impl PluginPane { send_plugin_instructions, max_height: None, max_width: None, + active_at: Instant::now(), } } } @@ -207,4 +210,12 @@ impl Pane for PluginPane { fn invisible_borders(&self) -> bool { self.invisible_borders } + + fn active_at(&self) -> Instant { + self.active_at + } + + fn set_active_at(&mut self, time: Instant) { + self.active_at = time; + } } diff --git a/src/client/panes/terminal_pane.rs b/src/client/panes/terminal_pane.rs index 51f735d4f8..ddb108893e 100644 --- a/src/client/panes/terminal_pane.rs +++ b/src/client/panes/terminal_pane.rs @@ -2,6 +2,7 @@ use crate::tab::Pane; use ::nix::pty::Winsize; use ::std::os::unix::io::RawFd; use std::fmt::Debug; +use std::time::Instant; use crate::panes::grid::Grid; use crate::panes::terminal_character::{ @@ -45,6 +46,7 @@ pub struct TerminalPane { pub position_and_size_override: Option, pub max_height: Option, pub max_width: Option, + pub active_at: Instant, vte_parser: vte::Parser, } @@ -282,6 +284,14 @@ impl Pane for TerminalPane { self.grid.reset_viewport(); self.grid.should_render = true; } + + fn active_at(&self) -> Instant { + self.active_at + } + + fn set_active_at(&mut self, time: Instant) { + self.active_at = time; + } } impl TerminalPane { @@ -296,6 +306,7 @@ impl TerminalPane { max_height: None, max_width: None, vte_parser: vte::Parser::new(), + active_at: Instant::now(), } } pub fn get_x(&self) -> usize { diff --git a/src/client/tab.rs b/src/client/tab.rs index 04d53f79a4..af48d3fe2c 100644 --- a/src/client/tab.rs +++ b/src/client/tab.rs @@ -13,6 +13,7 @@ use crate::wasm_vm::PluginInstruction; use crate::{boundaries::Boundaries, panes::PluginPane}; use serde::{Deserialize, Serialize}; use std::os::unix::io::RawFd; +use std::time::Instant; use std::{ cmp::Reverse, collections::{BTreeMap, HashSet}, @@ -122,6 +123,8 @@ pub trait Pane { fn scroll_up(&mut self, count: usize); fn scroll_down(&mut self, count: usize); fn clear_scroll(&mut self); + fn active_at(&self) -> Instant; + fn set_active_at(&mut self, instant: Instant); fn right_boundary_x_coords(&self) -> usize { self.x() + self.columns() @@ -700,6 +703,7 @@ impl Tab { if !self.panes_to_hide.contains(&pane.pid()) { match self.active_terminal.unwrap() == pane.pid() { true => { + pane.set_active_at(Instant::now()); boundaries.add_rect(pane.as_ref(), self.mode_info.mode, Some(colors::GREEN)) } false => boundaries.add_rect(pane.as_ref(), self.mode_info.mode, None), @@ -1837,7 +1841,7 @@ impl Tab { .filter(|(_, (_, c))| { c.is_directly_left_of(active) && c.horizontally_overlaps_with(active) }) - .max_by_key(|(_, (_, c))| c.get_horizontal_overlap_with(active)) + .max_by_key(|(_, (_, c))| c.active_at()) .map(|(_, (pid, _))| pid); match next_index { Some(&p) => { @@ -1867,7 +1871,7 @@ impl Tab { .filter(|(_, (_, c))| { c.is_directly_below(active) && c.vertically_overlaps_with(active) }) - .max_by_key(|(_, (_, c))| c.get_vertical_overlap_with(active)) + .max_by_key(|(_, (_, c))| c.active_at()) .map(|(_, (pid, _))| pid); match next_index { Some(&p) => { @@ -1897,7 +1901,7 @@ impl Tab { .filter(|(_, (_, c))| { c.is_directly_above(active) && c.vertically_overlaps_with(active) }) - .max_by_key(|(_, (_, c))| c.get_vertical_overlap_with(active)) + .max_by_key(|(_, (_, c))| c.active_at()) .map(|(_, (pid, _))| pid); match next_index { Some(&p) => { @@ -1927,7 +1931,7 @@ impl Tab { .filter(|(_, (_, c))| { c.is_directly_right_of(active) && c.horizontally_overlaps_with(active) }) - .max_by_key(|(_, (_, c))| c.get_horizontal_overlap_with(active)) + .max_by_key(|(_, (_, c))| c.active_at()) .map(|(_, (pid, _))| pid); match next_index { Some(&p) => { From 4f7ad31cf61e926ae9ba7134894c03871978b50f Mon Sep 17 00:00:00 2001 From: Dante Pippi <6619666+dantepippi@users.noreply.github.com> Date: Thu, 22 Apr 2021 21:07:55 -0300 Subject: [PATCH 2/3] Changing tests to test the new behavior Previous behavior was to go to the largest overlap. Now it should go to the most recently used pane. Used cargo insta review to update the snapshots. --- src/tests/integration/move_focus_down.rs | 2 +- src/tests/integration/move_focus_left.rs | 2 +- src/tests/integration/move_focus_right.rs | 2 +- src/tests/integration/move_focus_up.rs | 2 +- ...ve_focus_down__move_focus_down_to_the_largest_overlap.snap | 2 +- ...ve_focus_left__move_focus_left_to_the_largest_overlap.snap | 4 ++-- ..._focus_right__move_focus_right_to_the_largest_overlap.snap | 4 ++-- ...__move_focus_up__move_focus_up_to_the_largest_overlap.snap | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/tests/integration/move_focus_down.rs b/src/tests/integration/move_focus_down.rs index 7066dce0fc..273696ae70 100644 --- a/src/tests/integration/move_focus_down.rs +++ b/src/tests/integration/move_focus_down.rs @@ -45,7 +45,7 @@ pub fn move_focus_down() { } #[test] -pub fn move_focus_down_to_the_largest_overlap() { +pub fn move_focus_down_to_the_most_recently_used_pane() { let fake_win_size = PositionAndSize { columns: 121, rows: 20, diff --git a/src/tests/integration/move_focus_left.rs b/src/tests/integration/move_focus_left.rs index 3a5430c0bc..e36b8fcf4c 100644 --- a/src/tests/integration/move_focus_left.rs +++ b/src/tests/integration/move_focus_left.rs @@ -44,7 +44,7 @@ pub fn move_focus_left() { } #[test] -pub fn move_focus_left_to_the_largest_overlap() { +pub fn move_focus_left_to_the_most_recently_used_pane() { let fake_win_size = PositionAndSize { columns: 121, rows: 20, diff --git a/src/tests/integration/move_focus_right.rs b/src/tests/integration/move_focus_right.rs index d0e21708d0..88d86a263b 100644 --- a/src/tests/integration/move_focus_right.rs +++ b/src/tests/integration/move_focus_right.rs @@ -45,7 +45,7 @@ pub fn move_focus_right() { } #[test] -pub fn move_focus_right_to_the_largest_overlap() { +pub fn move_focus_right_to_the_most_recently_used_pane() { let fake_win_size = PositionAndSize { columns: 121, rows: 20, diff --git a/src/tests/integration/move_focus_up.rs b/src/tests/integration/move_focus_up.rs index 292d969fe8..d4ef6c8fd3 100644 --- a/src/tests/integration/move_focus_up.rs +++ b/src/tests/integration/move_focus_up.rs @@ -44,7 +44,7 @@ pub fn move_focus_up() { } #[test] -pub fn move_focus_up_to_the_largest_overlap() { +pub fn move_focus_up_to_the_most_recently_used_pane() { let fake_win_size = PositionAndSize { columns: 121, rows: 20, diff --git a/src/tests/integration/snapshots/zellij__tests__integration__move_focus_down__move_focus_down_to_the_largest_overlap.snap b/src/tests/integration/snapshots/zellij__tests__integration__move_focus_down__move_focus_down_to_the_largest_overlap.snap index 24cdf0f54c..1c53690e20 100644 --- a/src/tests/integration/snapshots/zellij__tests__integration__move_focus_down__move_focus_down_to_the_largest_overlap.snap +++ b/src/tests/integration/snapshots/zellij__tests__integration__move_focus_down__move_focus_down_to_the_largest_overlap.snap @@ -22,4 +22,4 @@ a │line18-bbbbbbbbbb line19-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line17-bbbbbbbbbbbbbbbbbbbbbb aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line19-bbbbbbbbbbbbbbbbbbbbbbb│line18-bbbbbbbbbbbbbbbbbbbbbb a │bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line19-bbbbbbbbbbbbbbbbbbbbbb -prompt $ █ │prompt $ │prompt $ +prompt $ │prompt $ │prompt $ █ diff --git a/src/tests/integration/snapshots/zellij__tests__integration__move_focus_left__move_focus_left_to_the_largest_overlap.snap b/src/tests/integration/snapshots/zellij__tests__integration__move_focus_left__move_focus_left_to_the_largest_overlap.snap index 8e35b97114..b175a53106 100644 --- a/src/tests/integration/snapshots/zellij__tests__integration__move_focus_left__move_focus_left_to_the_largest_overlap.snap +++ b/src/tests/integration/snapshots/zellij__tests__integration__move_focus_left__move_focus_left_to_the_largest_overlap.snap @@ -12,7 +12,7 @@ a │line6-bbbbbbbbbbb line19-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line7-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line8-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb a │line9-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb -prompt $ █ │line10-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +prompt $ │line10-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ────────────────────────────────────────────────────────────┤line11-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb line17-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line12-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb line18-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line13-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb @@ -22,4 +22,4 @@ prompt $ │line15-bbbbbbbbbb line17-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line17-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb line18-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line18-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb line19-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line19-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb -prompt $ │prompt $ +prompt $ █ │prompt $ diff --git a/src/tests/integration/snapshots/zellij__tests__integration__move_focus_right__move_focus_right_to_the_largest_overlap.snap b/src/tests/integration/snapshots/zellij__tests__integration__move_focus_right__move_focus_right_to_the_largest_overlap.snap index 0b745b0443..312b8c0441 100644 --- a/src/tests/integration/snapshots/zellij__tests__integration__move_focus_right__move_focus_right_to_the_largest_overlap.snap +++ b/src/tests/integration/snapshots/zellij__tests__integration__move_focus_right__move_focus_right_to_the_largest_overlap.snap @@ -12,7 +12,7 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line16-bbbbbbbbbb a │line17-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb line16-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line18-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line19-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb -a │prompt $ █ +a │prompt $ line17-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa├──────────────────────────────────────────────────────────── aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line17-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb a │line18-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb @@ -22,4 +22,4 @@ a ├───── line19-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line17-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line18-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb a │line19-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb -prompt $ │prompt $ +prompt $ │prompt $ █ diff --git a/src/tests/integration/snapshots/zellij__tests__integration__move_focus_up__move_focus_up_to_the_largest_overlap.snap b/src/tests/integration/snapshots/zellij__tests__integration__move_focus_up__move_focus_up_to_the_largest_overlap.snap index f09d8fa625..188bc9c4b1 100644 --- a/src/tests/integration/snapshots/zellij__tests__integration__move_focus_up__move_focus_up_to_the_largest_overlap.snap +++ b/src/tests/integration/snapshots/zellij__tests__integration__move_focus_up__move_focus_up_to_the_largest_overlap.snap @@ -12,7 +12,7 @@ a │line18-bbbbbbbbbb line19-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line17-bbbbbbbbbbbbbbbbbbbbbb aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line19-bbbbbbbbbbbbbbbbbbbbbbb│line18-bbbbbbbbbbbbbbbbbbbbbb a │bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line19-bbbbbbbbbbbbbbbbbbbbbb -prompt $ █ │prompt $ │prompt $ +prompt $ │prompt $ │prompt $ █ ────────────────────────────────────────────────────────────┴──────────────────────────────┴───────────────────────────── line12-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa line13-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa From 068136b52371e60f935e6b117ecd8e387b38b665 Mon Sep 17 00:00:00 2001 From: Dante Pippi <6619666+dantepippi@users.noreply.github.com> Date: Thu, 22 Apr 2021 21:28:38 -0300 Subject: [PATCH 3/3] Fixing snapshots --- ...s_down_to_the_most_recently_used_pane.snap | 25 +++++++++++++++++++ ...s_left_to_the_most_recently_used_pane.snap | 25 +++++++++++++++++++ ..._right_to_the_most_recently_used_pane.snap | 25 +++++++++++++++++++ ...cus_up_to_the_most_recently_used_pane.snap | 25 +++++++++++++++++++ 4 files changed, 100 insertions(+) create mode 100644 src/tests/integration/snapshots/zellij__tests__integration__move_focus_down__move_focus_down_to_the_most_recently_used_pane.snap create mode 100644 src/tests/integration/snapshots/zellij__tests__integration__move_focus_left__move_focus_left_to_the_most_recently_used_pane.snap create mode 100644 src/tests/integration/snapshots/zellij__tests__integration__move_focus_right__move_focus_right_to_the_most_recently_used_pane.snap create mode 100644 src/tests/integration/snapshots/zellij__tests__integration__move_focus_up__move_focus_up_to_the_most_recently_used_pane.snap diff --git a/src/tests/integration/snapshots/zellij__tests__integration__move_focus_down__move_focus_down_to_the_most_recently_used_pane.snap b/src/tests/integration/snapshots/zellij__tests__integration__move_focus_down__move_focus_down_to_the_most_recently_used_pane.snap new file mode 100644 index 0000000000..1c53690e20 --- /dev/null +++ b/src/tests/integration/snapshots/zellij__tests__integration__move_focus_down__move_focus_down_to_the_most_recently_used_pane.snap @@ -0,0 +1,25 @@ +--- +source: src/tests/integration/move_focus_down.rs +expression: snapshot_before_quit + +--- +line11-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line12-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line13-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line14-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line15-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line16-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line17-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line18-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line19-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +prompt $ +────────────────────────────────────────────────────────────┬──────────────────────────────┬───────────────────────────── +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line16-bbbbbbbbbbbbbbbbbbbbbbb│line12-bbbbbbbbbbbbbbbbbbbbbb +a │bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line13-bbbbbbbbbbbbbbbbbbbbbb +line18-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line17-bbbbbbbbbbbbbbbbbbbbbbb│line14-bbbbbbbbbbbbbbbbbbbbbb +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line15-bbbbbbbbbbbbbbbbbbbbbb +a │line18-bbbbbbbbbbbbbbbbbbbbbbb│line16-bbbbbbbbbbbbbbbbbbbbbb +line19-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line17-bbbbbbbbbbbbbbbbbbbbbb +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line19-bbbbbbbbbbbbbbbbbbbbbbb│line18-bbbbbbbbbbbbbbbbbbbbbb +a │bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line19-bbbbbbbbbbbbbbbbbbbbbb +prompt $ │prompt $ │prompt $ █ diff --git a/src/tests/integration/snapshots/zellij__tests__integration__move_focus_left__move_focus_left_to_the_most_recently_used_pane.snap b/src/tests/integration/snapshots/zellij__tests__integration__move_focus_left__move_focus_left_to_the_most_recently_used_pane.snap new file mode 100644 index 0000000000..b175a53106 --- /dev/null +++ b/src/tests/integration/snapshots/zellij__tests__integration__move_focus_left__move_focus_left_to_the_most_recently_used_pane.snap @@ -0,0 +1,25 @@ +--- +source: src/tests/integration/move_focus_left.rs +expression: snapshot_before_quit + +--- +line17-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line1-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line2-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +a │line3-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line18-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line4-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line5-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +a │line6-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line19-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line7-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line8-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +a │line9-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +prompt $ │line10-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +────────────────────────────────────────────────────────────┤line11-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line17-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line12-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line18-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line13-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line19-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line14-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +prompt $ │line15-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +────────────────────────────────────────────────────────────┤line16-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line17-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line17-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line18-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line18-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line19-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line19-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +prompt $ █ │prompt $ diff --git a/src/tests/integration/snapshots/zellij__tests__integration__move_focus_right__move_focus_right_to_the_most_recently_used_pane.snap b/src/tests/integration/snapshots/zellij__tests__integration__move_focus_right__move_focus_right_to_the_most_recently_used_pane.snap new file mode 100644 index 0000000000..312b8c0441 --- /dev/null +++ b/src/tests/integration/snapshots/zellij__tests__integration__move_focus_right__move_focus_right_to_the_most_recently_used_pane.snap @@ -0,0 +1,25 @@ +--- +source: src/tests/integration/move_focus_right.rs +expression: snapshot_before_quit + +--- +a │line11-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line14-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line12-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line13-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +a │line14-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line15-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line15-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line16-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +a │line17-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line16-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line18-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line19-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +a │prompt $ +line17-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa├──────────────────────────────────────────────────────────── +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line17-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +a │line18-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +line18-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line19-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│prompt $ +a ├──────────────────────────────────────────────────────────── +line19-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line17-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line18-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +a │line19-bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +prompt $ │prompt $ █ diff --git a/src/tests/integration/snapshots/zellij__tests__integration__move_focus_up__move_focus_up_to_the_most_recently_used_pane.snap b/src/tests/integration/snapshots/zellij__tests__integration__move_focus_up__move_focus_up_to_the_most_recently_used_pane.snap new file mode 100644 index 0000000000..188bc9c4b1 --- /dev/null +++ b/src/tests/integration/snapshots/zellij__tests__integration__move_focus_up__move_focus_up_to_the_most_recently_used_pane.snap @@ -0,0 +1,25 @@ +--- +source: src/tests/integration/move_focus_up.rs +expression: snapshot_before_quit + +--- +line17-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line11-bbbbbbbbbbbbbbbbbbbbbb +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line16-bbbbbbbbbbbbbbbbbbbbbbb│line12-bbbbbbbbbbbbbbbbbbbbbb +a │bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line13-bbbbbbbbbbbbbbbbbbbbbb +line18-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line17-bbbbbbbbbbbbbbbbbbbbbbb│line14-bbbbbbbbbbbbbbbbbbbbbb +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line15-bbbbbbbbbbbbbbbbbbbbbb +a │line18-bbbbbbbbbbbbbbbbbbbbbbb│line16-bbbbbbbbbbbbbbbbbbbbbb +line19-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line17-bbbbbbbbbbbbbbbbbbbbbb +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa│line19-bbbbbbbbbbbbbbbbbbbbbbb│line18-bbbbbbbbbbbbbbbbbbbbbb +a │bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb│line19-bbbbbbbbbbbbbbbbbbbbbb +prompt $ │prompt $ │prompt $ █ +────────────────────────────────────────────────────────────┴──────────────────────────────┴───────────────────────────── +line12-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line13-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line14-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line15-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line16-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line17-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line18-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +line19-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +prompt $