Merge pull request #471 from dantepippi/switch-tabs-464
Switching Tabs if there's no pane in the direction
This commit is contained in:
commit
74526a936a
14 changed files with 197 additions and 19 deletions
|
|
@ -16,9 +16,9 @@ keybinds:
|
||||||
key: [Ctrl: 'q',]
|
key: [Ctrl: 'q',]
|
||||||
- action: [NewPane: ]
|
- action: [NewPane: ]
|
||||||
key: [ Alt: 'n',]
|
key: [ Alt: 'n',]
|
||||||
- action: [MoveFocus: Left,]
|
- action: [MoveFocusOrTab: Left,]
|
||||||
key: [ Alt: 'h',]
|
key: [ Alt: 'h',]
|
||||||
- action: [MoveFocus: Right,]
|
- action: [MoveFocusOrTab: Right,]
|
||||||
key: [ Alt: 'l',]
|
key: [ Alt: 'l',]
|
||||||
- action: [MoveFocus: Down,]
|
- action: [MoveFocus: Down,]
|
||||||
key: [ Alt: 'j',]
|
key: [ Alt: 'j',]
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,9 @@ keybinds:
|
||||||
key: [Ctrl: 'q',]
|
key: [Ctrl: 'q',]
|
||||||
- action: [NewPane: ]
|
- action: [NewPane: ]
|
||||||
key: [ Alt: 'n',]
|
key: [ Alt: 'n',]
|
||||||
- action: [MoveFocus: Left,]
|
- action: [MoveFocusOrTab: Left,]
|
||||||
key: [ Alt: 'h',]
|
key: [ Alt: 'h',]
|
||||||
- action: [MoveFocus: Right,]
|
- action: [MoveFocusOrTab: Right,]
|
||||||
key: [ Alt: 'l',]
|
key: [ Alt: 'l',]
|
||||||
- action: [MoveFocus: Down,]
|
- action: [MoveFocus: Down,]
|
||||||
key: [ Alt: 'j',]
|
key: [ Alt: 'j',]
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,9 @@ keybinds:
|
||||||
key: [Ctrl: 'q',]
|
key: [Ctrl: 'q',]
|
||||||
- action: [NewPane: ]
|
- action: [NewPane: ]
|
||||||
key: [ Alt: 'n',]
|
key: [ Alt: 'n',]
|
||||||
- action: [MoveFocus: Left,]
|
- action: [MoveFocusOrTab: Left,]
|
||||||
key: [ Alt: 'h',]
|
key: [ Alt: 'h',]
|
||||||
- action: [MoveFocus: Right,]
|
- action: [MoveFocusOrTab: Right,]
|
||||||
key: [ Alt: 'l',]
|
key: [ Alt: 'l',]
|
||||||
- action: [MoveFocus: Down,]
|
- action: [MoveFocus: Down,]
|
||||||
key: [ Alt: 'j',]
|
key: [ Alt: 'j',]
|
||||||
|
|
|
||||||
|
|
@ -1848,12 +1848,13 @@ impl Tab {
|
||||||
}
|
}
|
||||||
self.render();
|
self.render();
|
||||||
}
|
}
|
||||||
pub fn move_focus_left(&mut self) {
|
// returns a boolean that indicates whether the focus moved
|
||||||
|
pub fn move_focus_left(&mut self) -> bool {
|
||||||
if !self.has_selectable_panes() {
|
if !self.has_selectable_panes() {
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
if self.fullscreen_is_active {
|
if self.fullscreen_is_active {
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
let active_terminal = self.get_active_pane();
|
let active_terminal = self.get_active_pane();
|
||||||
if let Some(active) = active_terminal {
|
if let Some(active) = active_terminal {
|
||||||
|
|
@ -1868,6 +1869,8 @@ impl Tab {
|
||||||
match next_index {
|
match next_index {
|
||||||
Some(&p) => {
|
Some(&p) => {
|
||||||
self.active_terminal = Some(p);
|
self.active_terminal = Some(p);
|
||||||
|
self.render();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
None => {
|
None => {
|
||||||
self.active_terminal = Some(active.pid());
|
self.active_terminal = Some(active.pid());
|
||||||
|
|
@ -1876,7 +1879,7 @@ impl Tab {
|
||||||
} else {
|
} else {
|
||||||
self.active_terminal = Some(active_terminal.unwrap().pid());
|
self.active_terminal = Some(active_terminal.unwrap().pid());
|
||||||
}
|
}
|
||||||
self.render();
|
false
|
||||||
}
|
}
|
||||||
pub fn move_focus_down(&mut self) {
|
pub fn move_focus_down(&mut self) {
|
||||||
if !self.has_selectable_panes() {
|
if !self.has_selectable_panes() {
|
||||||
|
|
@ -1938,12 +1941,13 @@ impl Tab {
|
||||||
}
|
}
|
||||||
self.render();
|
self.render();
|
||||||
}
|
}
|
||||||
pub fn move_focus_right(&mut self) {
|
// returns a boolean that indicates whether the focus moved
|
||||||
|
pub fn move_focus_right(&mut self) -> bool {
|
||||||
if !self.has_selectable_panes() {
|
if !self.has_selectable_panes() {
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
if self.fullscreen_is_active {
|
if self.fullscreen_is_active {
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
let active_terminal = self.get_active_pane();
|
let active_terminal = self.get_active_pane();
|
||||||
if let Some(active) = active_terminal {
|
if let Some(active) = active_terminal {
|
||||||
|
|
@ -1958,6 +1962,8 @@ impl Tab {
|
||||||
match next_index {
|
match next_index {
|
||||||
Some(&p) => {
|
Some(&p) => {
|
||||||
self.active_terminal = Some(p);
|
self.active_terminal = Some(p);
|
||||||
|
self.render();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
None => {
|
None => {
|
||||||
self.active_terminal = Some(active.pid());
|
self.active_terminal = Some(active.pid());
|
||||||
|
|
@ -1966,7 +1972,7 @@ impl Tab {
|
||||||
} else {
|
} else {
|
||||||
self.active_terminal = Some(active_terminal.unwrap().pid());
|
self.active_terminal = Some(active_terminal.unwrap().pid());
|
||||||
}
|
}
|
||||||
self.render();
|
false
|
||||||
}
|
}
|
||||||
fn horizontal_borders(&self, terminals: &[PaneId]) -> HashSet<usize> {
|
fn horizontal_borders(&self, terminals: &[PaneId]) -> HashSet<usize> {
|
||||||
terminals.iter().fold(HashSet::new(), |mut borders, t| {
|
terminals.iter().fold(HashSet::new(), |mut borders, t| {
|
||||||
|
|
|
||||||
|
|
@ -192,9 +192,11 @@ pub enum ScreenContext {
|
||||||
FocusNextPane,
|
FocusNextPane,
|
||||||
FocusPreviousPane,
|
FocusPreviousPane,
|
||||||
MoveFocusLeft,
|
MoveFocusLeft,
|
||||||
|
MoveFocusLeftOrPreviousTab,
|
||||||
MoveFocusDown,
|
MoveFocusDown,
|
||||||
MoveFocusUp,
|
MoveFocusUp,
|
||||||
MoveFocusRight,
|
MoveFocusRight,
|
||||||
|
MoveFocusRightOrNextTab,
|
||||||
Exit,
|
Exit,
|
||||||
ScrollUp,
|
ScrollUp,
|
||||||
ScrollDown,
|
ScrollDown,
|
||||||
|
|
@ -237,9 +239,13 @@ impl From<&ScreenInstruction> for ScreenContext {
|
||||||
ScreenInstruction::FocusNextPane => ScreenContext::FocusNextPane,
|
ScreenInstruction::FocusNextPane => ScreenContext::FocusNextPane,
|
||||||
ScreenInstruction::FocusPreviousPane => ScreenContext::FocusPreviousPane,
|
ScreenInstruction::FocusPreviousPane => ScreenContext::FocusPreviousPane,
|
||||||
ScreenInstruction::MoveFocusLeft => ScreenContext::MoveFocusLeft,
|
ScreenInstruction::MoveFocusLeft => ScreenContext::MoveFocusLeft,
|
||||||
|
ScreenInstruction::MoveFocusLeftOrPreviousTab => {
|
||||||
|
ScreenContext::MoveFocusLeftOrPreviousTab
|
||||||
|
}
|
||||||
ScreenInstruction::MoveFocusDown => ScreenContext::MoveFocusDown,
|
ScreenInstruction::MoveFocusDown => ScreenContext::MoveFocusDown,
|
||||||
ScreenInstruction::MoveFocusUp => ScreenContext::MoveFocusUp,
|
ScreenInstruction::MoveFocusUp => ScreenContext::MoveFocusUp,
|
||||||
ScreenInstruction::MoveFocusRight => ScreenContext::MoveFocusRight,
|
ScreenInstruction::MoveFocusRight => ScreenContext::MoveFocusRight,
|
||||||
|
ScreenInstruction::MoveFocusRightOrNextTab => ScreenContext::MoveFocusRightOrNextTab,
|
||||||
ScreenInstruction::Exit => ScreenContext::Exit,
|
ScreenInstruction::Exit => ScreenContext::Exit,
|
||||||
ScreenInstruction::ScrollUp => ScreenContext::ScrollUp,
|
ScreenInstruction::ScrollUp => ScreenContext::ScrollUp,
|
||||||
ScreenInstruction::ScrollDown => ScreenContext::ScrollDown,
|
ScreenInstruction::ScrollDown => ScreenContext::ScrollDown,
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,9 @@ pub enum Action {
|
||||||
/// Move the focus pane in specified direction.
|
/// Move the focus pane in specified direction.
|
||||||
SwitchFocus,
|
SwitchFocus,
|
||||||
MoveFocus(Direction),
|
MoveFocus(Direction),
|
||||||
|
/// Tries to move the focus pane in specified direction.
|
||||||
|
/// If there is no pane in the direction, move to previous/next Tab.
|
||||||
|
MoveFocusOrTab(Direction),
|
||||||
/// Scroll up in focus pane.
|
/// Scroll up in focus pane.
|
||||||
ScrollUp,
|
ScrollUp,
|
||||||
/// Scroll down in focus pane.
|
/// Scroll down in focus pane.
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,8 @@ impl InputHandler {
|
||||||
| Action::GoToNextTab
|
| Action::GoToNextTab
|
||||||
| Action::GoToPreviousTab
|
| Action::GoToPreviousTab
|
||||||
| Action::CloseTab
|
| Action::CloseTab
|
||||||
| Action::GoToTab(_) => {
|
| Action::GoToTab(_)
|
||||||
|
| Action::MoveFocusOrTab(_) => {
|
||||||
self.command_is_executing.blocking_input_thread();
|
self.command_is_executing.blocking_input_thread();
|
||||||
self.os_input
|
self.os_input
|
||||||
.send_to_server(ServerInstruction::Action(action));
|
.send_to_server(ServerInstruction::Action(action));
|
||||||
|
|
|
||||||
|
|
@ -33,9 +33,11 @@ pub enum ScreenInstruction {
|
||||||
FocusNextPane,
|
FocusNextPane,
|
||||||
FocusPreviousPane,
|
FocusPreviousPane,
|
||||||
MoveFocusLeft,
|
MoveFocusLeft,
|
||||||
|
MoveFocusLeftOrPreviousTab,
|
||||||
MoveFocusDown,
|
MoveFocusDown,
|
||||||
MoveFocusUp,
|
MoveFocusUp,
|
||||||
MoveFocusRight,
|
MoveFocusRight,
|
||||||
|
MoveFocusRightOrNextTab,
|
||||||
Exit,
|
Exit,
|
||||||
ScrollUp,
|
ScrollUp,
|
||||||
ScrollDown,
|
ScrollDown,
|
||||||
|
|
@ -422,12 +424,32 @@ pub fn screen_thread_main(
|
||||||
ScreenInstruction::MoveFocusLeft => {
|
ScreenInstruction::MoveFocusLeft => {
|
||||||
screen.get_active_tab_mut().unwrap().move_focus_left();
|
screen.get_active_tab_mut().unwrap().move_focus_left();
|
||||||
}
|
}
|
||||||
|
ScreenInstruction::MoveFocusLeftOrPreviousTab => {
|
||||||
|
if !screen.get_active_tab_mut().unwrap().move_focus_left() {
|
||||||
|
screen.switch_tab_prev();
|
||||||
|
}
|
||||||
|
screen
|
||||||
|
.bus
|
||||||
|
.senders
|
||||||
|
.send_to_server(ServerInstruction::UnblockInputThread)
|
||||||
|
.unwrap();
|
||||||
|
}
|
||||||
ScreenInstruction::MoveFocusDown => {
|
ScreenInstruction::MoveFocusDown => {
|
||||||
screen.get_active_tab_mut().unwrap().move_focus_down();
|
screen.get_active_tab_mut().unwrap().move_focus_down();
|
||||||
}
|
}
|
||||||
ScreenInstruction::MoveFocusRight => {
|
ScreenInstruction::MoveFocusRight => {
|
||||||
screen.get_active_tab_mut().unwrap().move_focus_right();
|
screen.get_active_tab_mut().unwrap().move_focus_right();
|
||||||
}
|
}
|
||||||
|
ScreenInstruction::MoveFocusRightOrNextTab => {
|
||||||
|
if !screen.get_active_tab_mut().unwrap().move_focus_right() {
|
||||||
|
screen.switch_tab_next();
|
||||||
|
}
|
||||||
|
screen
|
||||||
|
.bus
|
||||||
|
.senders
|
||||||
|
.send_to_server(ServerInstruction::UnblockInputThread)
|
||||||
|
.unwrap();
|
||||||
|
}
|
||||||
ScreenInstruction::MoveFocusUp => {
|
ScreenInstruction::MoveFocusUp => {
|
||||||
screen.get_active_tab_mut().unwrap().move_focus_up();
|
screen.get_active_tab_mut().unwrap().move_focus_up();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,14 @@ fn route_action(action: Action, session: &SessionMetaData, os_input: &dyn Server
|
||||||
};
|
};
|
||||||
session.senders.send_to_screen(screen_instr).unwrap();
|
session.senders.send_to_screen(screen_instr).unwrap();
|
||||||
}
|
}
|
||||||
|
Action::MoveFocusOrTab(direction) => {
|
||||||
|
let screen_instr = match direction {
|
||||||
|
Direction::Left => ScreenInstruction::MoveFocusLeftOrPreviousTab,
|
||||||
|
Direction::Right => ScreenInstruction::MoveFocusRightOrNextTab,
|
||||||
|
_ => unreachable!(),
|
||||||
|
};
|
||||||
|
session.senders.send_to_screen(screen_instr).unwrap();
|
||||||
|
}
|
||||||
Action::ScrollUp => {
|
Action::ScrollUp => {
|
||||||
session
|
session
|
||||||
.senders
|
.senders
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,9 @@ use crate::{start, CliArgs};
|
||||||
|
|
||||||
use crate::common::input::config::Config;
|
use crate::common::input::config::Config;
|
||||||
use crate::tests::utils::commands::{
|
use crate::tests::utils::commands::{
|
||||||
MOVE_FOCUS_LEFT_IN_PANE_MODE, MOVE_FOCUS_RIGHT_IN_PANE_MODE, PANE_MODE, QUIT,
|
ENTER, MOVE_FOCUS_LEFT_IN_NORMAL_MODE, MOVE_FOCUS_LEFT_IN_PANE_MODE,
|
||||||
SPLIT_DOWN_IN_PANE_MODE, SPLIT_RIGHT_IN_PANE_MODE,
|
MOVE_FOCUS_RIGHT_IN_PANE_MODE, NEW_TAB_IN_TAB_MODE, PANE_MODE, QUIT, SPLIT_DOWN_IN_PANE_MODE,
|
||||||
|
SPLIT_RIGHT_IN_PANE_MODE, TAB_MODE,
|
||||||
};
|
};
|
||||||
|
|
||||||
fn get_fake_os_input(fake_win_size: &PositionAndSize) -> FakeInputOutput {
|
fn get_fake_os_input(fake_win_size: &PositionAndSize) -> FakeInputOutput {
|
||||||
|
|
@ -86,3 +87,41 @@ pub fn move_focus_left_to_the_most_recently_used_pane() {
|
||||||
get_next_to_last_snapshot(snapshots).expect("could not find snapshot");
|
get_next_to_last_snapshot(snapshots).expect("could not find snapshot");
|
||||||
assert_snapshot!(snapshot_before_quit);
|
assert_snapshot!(snapshot_before_quit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
pub fn move_focus_left_changes_tab() {
|
||||||
|
let fake_win_size = PositionAndSize {
|
||||||
|
columns: 121,
|
||||||
|
rows: 20,
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
..Default::default()
|
||||||
|
};
|
||||||
|
let mut fake_input_output = get_fake_os_input(&fake_win_size);
|
||||||
|
fake_input_output.add_terminal_input(&[
|
||||||
|
&PANE_MODE,
|
||||||
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
|
&ENTER,
|
||||||
|
&TAB_MODE,
|
||||||
|
&NEW_TAB_IN_TAB_MODE,
|
||||||
|
&ENTER,
|
||||||
|
&MOVE_FOCUS_LEFT_IN_NORMAL_MODE,
|
||||||
|
&QUIT,
|
||||||
|
]);
|
||||||
|
start(
|
||||||
|
Box::new(fake_input_output.clone()),
|
||||||
|
CliArgs::default(),
|
||||||
|
Box::new(fake_input_output.clone()),
|
||||||
|
Config::default(),
|
||||||
|
);
|
||||||
|
|
||||||
|
let output_frames = fake_input_output
|
||||||
|
.stdout_writer
|
||||||
|
.output_frames
|
||||||
|
.lock()
|
||||||
|
.unwrap();
|
||||||
|
let snapshots = get_output_frame_snapshots(&output_frames, &fake_win_size);
|
||||||
|
let snapshot_before_quit =
|
||||||
|
get_next_to_last_snapshot(snapshots).expect("could not find snapshot");
|
||||||
|
assert_snapshot!(snapshot_before_quit);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,9 @@ use crate::{start, CliArgs};
|
||||||
|
|
||||||
use crate::common::input::config::Config;
|
use crate::common::input::config::Config;
|
||||||
use crate::tests::utils::commands::{
|
use crate::tests::utils::commands::{
|
||||||
MOVE_FOCUS_LEFT_IN_PANE_MODE, MOVE_FOCUS_RIGHT_IN_PANE_MODE, PANE_MODE, QUIT,
|
ENTER, MOVE_FOCUS_LEFT_IN_PANE_MODE, MOVE_FOCUS_RIGHT_IN_NORMAL_MODE,
|
||||||
SPLIT_DOWN_IN_PANE_MODE, SPLIT_RIGHT_IN_PANE_MODE,
|
MOVE_FOCUS_RIGHT_IN_PANE_MODE, NEW_TAB_IN_TAB_MODE, PANE_MODE, QUIT, SPLIT_DOWN_IN_PANE_MODE,
|
||||||
|
SPLIT_RIGHT_IN_PANE_MODE, TAB_MODE,
|
||||||
};
|
};
|
||||||
|
|
||||||
fn get_fake_os_input(fake_win_size: &PositionAndSize) -> FakeInputOutput {
|
fn get_fake_os_input(fake_win_size: &PositionAndSize) -> FakeInputOutput {
|
||||||
|
|
@ -86,3 +87,41 @@ pub fn move_focus_right_to_the_most_recently_used_pane() {
|
||||||
get_next_to_last_snapshot(snapshots).expect("could not find snapshot");
|
get_next_to_last_snapshot(snapshots).expect("could not find snapshot");
|
||||||
assert_snapshot!(snapshot_before_quit);
|
assert_snapshot!(snapshot_before_quit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
pub fn move_focus_right_changes_tab() {
|
||||||
|
let fake_win_size = PositionAndSize {
|
||||||
|
columns: 121,
|
||||||
|
rows: 20,
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
..Default::default()
|
||||||
|
};
|
||||||
|
let mut fake_input_output = get_fake_os_input(&fake_win_size);
|
||||||
|
fake_input_output.add_terminal_input(&[
|
||||||
|
&PANE_MODE,
|
||||||
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
|
&ENTER,
|
||||||
|
&TAB_MODE,
|
||||||
|
&NEW_TAB_IN_TAB_MODE,
|
||||||
|
&ENTER,
|
||||||
|
&MOVE_FOCUS_RIGHT_IN_NORMAL_MODE,
|
||||||
|
&QUIT,
|
||||||
|
]);
|
||||||
|
start(
|
||||||
|
Box::new(fake_input_output.clone()),
|
||||||
|
CliArgs::default(),
|
||||||
|
Box::new(fake_input_output.clone()),
|
||||||
|
Config::default(),
|
||||||
|
);
|
||||||
|
|
||||||
|
let output_frames = fake_input_output
|
||||||
|
.stdout_writer
|
||||||
|
.output_frames
|
||||||
|
.lock()
|
||||||
|
.unwrap();
|
||||||
|
let snapshots = get_output_frame_snapshots(&output_frames, &fake_win_size);
|
||||||
|
let snapshot_before_quit =
|
||||||
|
get_next_to_last_snapshot(snapshots).expect("could not find snapshot");
|
||||||
|
assert_snapshot!(snapshot_before_quit);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
---
|
||||||
|
source: src/tests/integration/move_focus_left.rs
|
||||||
|
expression: snapshot_before_quit
|
||||||
|
|
||||||
|
---
|
||||||
|
line11-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line12-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line13-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line14-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line15-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line16-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line17-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line18-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line19-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
prompt $
|
||||||
|
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||||
|
line12-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line13-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line14-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line15-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line16-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line17-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line18-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line19-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
prompt $ █
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
---
|
||||||
|
source: src/tests/integration/move_focus_right.rs
|
||||||
|
expression: snapshot_before_quit
|
||||||
|
|
||||||
|
---
|
||||||
|
line11-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line12-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line13-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line14-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line15-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line16-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line17-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line18-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line19-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
prompt $
|
||||||
|
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||||
|
line12-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line13-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line14-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line15-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line16-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line17-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line18-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
line19-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
prompt $ █
|
||||||
|
|
@ -47,6 +47,10 @@ pub fn get_next_to_last_snapshot(mut snapshots: Vec<String>) -> Option<String> {
|
||||||
pub mod commands {
|
pub mod commands {
|
||||||
pub const QUIT: [u8; 1] = [17]; // ctrl-q
|
pub const QUIT: [u8; 1] = [17]; // ctrl-q
|
||||||
pub const ESC: [u8; 1] = [27];
|
pub const ESC: [u8; 1] = [27];
|
||||||
|
pub const ENTER: [u8; 1] = [10]; // char '\n'
|
||||||
|
|
||||||
|
pub const MOVE_FOCUS_LEFT_IN_NORMAL_MODE: [u8; 2] = [27, 104]; // alt-h
|
||||||
|
pub const MOVE_FOCUS_RIGHT_IN_NORMAL_MODE: [u8; 2] = [27, 108]; // alt-l
|
||||||
|
|
||||||
pub const PANE_MODE: [u8; 1] = [16]; // ctrl-p
|
pub const PANE_MODE: [u8; 1] = [16]; // ctrl-p
|
||||||
pub const SPAWN_TERMINAL_IN_PANE_MODE: [u8; 1] = [110]; // n
|
pub const SPAWN_TERMINAL_IN_PANE_MODE: [u8; 1] = [110]; // n
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue