feat(input): new keybindings and persistent mode as default (#181)
* added some comments in the input module * InputHandler now has InputState instead of separate InputMode and permanent bool * keybinds are now associated with a Vec<Action> instead of a single Action * removing "persistent" modes alltogether to reimplement the feature, help bar broken * locked command mode by default, fixes #161, help bar still broken * status bar fixed, still a few improvements/bugs to go * better shortcut help bar contents * fixed last bits and i think we are good * modified tests according to new controls, not working * Revert "modified tests according to new controls, not working" This reverts commit f2d9421ff0169feb83dbd9b246e59b9244cafc16. * basic.rs tests now pass, not the rest * close_pane.rs tests pass, but very slowly? * compatibility.rs tests pass, very slowly as well * {layout, {move_focus_*}}.rs all working mildly slowly * {resize_*}.rs should all work but very slowly and funky, see PR comments * {tabs,toggle_fullscreen}.rs pass. Test performance issue yet to be fixed * tests now work, with a hack :| ready for merge * rustfmt + deleted references to InputState and mode persistency
This commit is contained in:
parent
695a75c363
commit
c74e2ef273
23 changed files with 224 additions and 650 deletions
Binary file not shown.
Binary file not shown.
|
|
@ -24,18 +24,13 @@ impl Display for LinePart {
|
||||||
|
|
||||||
fn prefix(help: &Help) -> LinePart {
|
fn prefix(help: &Help) -> LinePart {
|
||||||
let prefix_text = " Zellij ";
|
let prefix_text = " Zellij ";
|
||||||
let part = match (&help.mode, help.mode_is_persistent) {
|
let part = match &help.mode {
|
||||||
(InputMode::Command, false) => {
|
InputMode::Command => {
|
||||||
let prefix = prefix_text.bold().white().on_black();
|
let prefix = prefix_text.bold().white().on_black();
|
||||||
let separator = ARROW_SEPARATOR.black().on_magenta();
|
let separator = ARROW_SEPARATOR.black().on_magenta();
|
||||||
format!("{}{}", prefix, separator)
|
format!("{}{}", prefix, separator)
|
||||||
}
|
}
|
||||||
(_, true) => {
|
InputMode::Normal => {
|
||||||
let prefix = prefix_text.bold().white().on_black();
|
|
||||||
let separator = ARROW_SEPARATOR.black().on_yellow();
|
|
||||||
format!("{}{}", prefix, separator)
|
|
||||||
}
|
|
||||||
(InputMode::Normal, _) => {
|
|
||||||
let prefix = prefix_text.bold().white().on_black();
|
let prefix = prefix_text.bold().white().on_black();
|
||||||
let separator = ARROW_SEPARATOR.black().on_green();
|
let separator = ARROW_SEPARATOR.black().on_green();
|
||||||
format!("{}{}", prefix, separator)
|
format!("{}{}", prefix, separator)
|
||||||
|
|
@ -52,9 +47,8 @@ fn prefix(help: &Help) -> LinePart {
|
||||||
|
|
||||||
fn key_path(help: &Help) -> LinePart {
|
fn key_path(help: &Help) -> LinePart {
|
||||||
let superkey_text = "<Ctrl-g> ";
|
let superkey_text = "<Ctrl-g> ";
|
||||||
let locked_text = "LOCKED ";
|
let (part, len) = match &help.mode {
|
||||||
let (part, len) = match (&help.mode, help.mode_is_persistent) {
|
InputMode::Command => {
|
||||||
(InputMode::Command, false) => {
|
|
||||||
let key_path = superkey_text.bold().on_magenta();
|
let key_path = superkey_text.bold().on_magenta();
|
||||||
let first_separator = ARROW_SEPARATOR.magenta().on_black();
|
let first_separator = ARROW_SEPARATOR.magenta().on_black();
|
||||||
let len = superkey_text.chars().count()
|
let len = superkey_text.chars().count()
|
||||||
|
|
@ -62,23 +56,7 @@ fn key_path(help: &Help) -> LinePart {
|
||||||
+ ARROW_SEPARATOR.chars().count();
|
+ ARROW_SEPARATOR.chars().count();
|
||||||
(format!("{}{}", key_path, first_separator), len)
|
(format!("{}{}", key_path, first_separator), len)
|
||||||
}
|
}
|
||||||
(InputMode::Command, true) => {
|
InputMode::Resize => {
|
||||||
let locked = locked_text.bold().white().on_yellow();
|
|
||||||
let locked_separator = ARROW_SEPARATOR.yellow().on_magenta();
|
|
||||||
let key_path = superkey_text.bold().on_magenta();
|
|
||||||
let superkey_separator = ARROW_SEPARATOR.magenta().on_black();
|
|
||||||
let len = superkey_text.chars().count()
|
|
||||||
+ ARROW_SEPARATOR.chars().count()
|
|
||||||
+ locked_text.chars().count();
|
|
||||||
(
|
|
||||||
format!(
|
|
||||||
"{}{}{}{}",
|
|
||||||
locked, locked_separator, key_path, superkey_separator
|
|
||||||
),
|
|
||||||
len,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
(InputMode::Resize, false) => {
|
|
||||||
let mode_shortcut_text = "r ";
|
let mode_shortcut_text = "r ";
|
||||||
let superkey = superkey_text.bold().on_magenta();
|
let superkey = superkey_text.bold().on_magenta();
|
||||||
let first_superkey_separator = ARROW_SEPARATOR.magenta().on_black();
|
let first_superkey_separator = ARROW_SEPARATOR.magenta().on_black();
|
||||||
|
|
@ -102,37 +80,7 @@ fn key_path(help: &Help) -> LinePart {
|
||||||
len,
|
len,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
(InputMode::Resize, true) => {
|
InputMode::Pane => {
|
||||||
let mode_shortcut_text = "r ";
|
|
||||||
let locked = locked_text.white().bold().on_yellow();
|
|
||||||
let locked_separator = ARROW_SEPARATOR.yellow().on_magenta();
|
|
||||||
let superkey = superkey_text.bold().on_magenta();
|
|
||||||
let first_superkey_separator = ARROW_SEPARATOR.magenta().on_black();
|
|
||||||
let second_superkey_separator = ARROW_SEPARATOR.black().on_magenta();
|
|
||||||
let mode_shortcut = mode_shortcut_text.white().bold().on_magenta();
|
|
||||||
let mode_shortcut_separator = ARROW_SEPARATOR.magenta().on_black();
|
|
||||||
let len = locked_text.chars().count()
|
|
||||||
+ ARROW_SEPARATOR.chars().count()
|
|
||||||
+ superkey_text.chars().count()
|
|
||||||
+ ARROW_SEPARATOR.chars().count()
|
|
||||||
+ ARROW_SEPARATOR.chars().count()
|
|
||||||
+ mode_shortcut_text.chars().count()
|
|
||||||
+ ARROW_SEPARATOR.chars().count();
|
|
||||||
(
|
|
||||||
format!(
|
|
||||||
"{}{}{}{}{}{}{}",
|
|
||||||
locked,
|
|
||||||
locked_separator,
|
|
||||||
superkey,
|
|
||||||
first_superkey_separator,
|
|
||||||
second_superkey_separator,
|
|
||||||
mode_shortcut,
|
|
||||||
mode_shortcut_separator
|
|
||||||
),
|
|
||||||
len,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
(InputMode::Pane, false) => {
|
|
||||||
let mode_shortcut_text = "p ";
|
let mode_shortcut_text = "p ";
|
||||||
let superkey = superkey_text.bold().on_magenta();
|
let superkey = superkey_text.bold().on_magenta();
|
||||||
let first_superkey_separator = ARROW_SEPARATOR.magenta().on_black();
|
let first_superkey_separator = ARROW_SEPARATOR.magenta().on_black();
|
||||||
|
|
@ -156,37 +104,7 @@ fn key_path(help: &Help) -> LinePart {
|
||||||
len,
|
len,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
(InputMode::Pane, true) => {
|
InputMode::Tab => {
|
||||||
let mode_shortcut_text = "p ";
|
|
||||||
let locked = locked_text.white().bold().on_yellow();
|
|
||||||
let locked_separator = ARROW_SEPARATOR.yellow().on_magenta();
|
|
||||||
let superkey = superkey_text.bold().on_magenta();
|
|
||||||
let first_superkey_separator = ARROW_SEPARATOR.magenta().on_black();
|
|
||||||
let second_superkey_separator = ARROW_SEPARATOR.black().on_magenta();
|
|
||||||
let mode_shortcut = mode_shortcut_text.white().bold().on_magenta();
|
|
||||||
let mode_shortcut_separator = ARROW_SEPARATOR.magenta().on_black();
|
|
||||||
let len = locked_text.chars().count()
|
|
||||||
+ ARROW_SEPARATOR.chars().count()
|
|
||||||
+ superkey_text.chars().count()
|
|
||||||
+ ARROW_SEPARATOR.chars().count()
|
|
||||||
+ ARROW_SEPARATOR.chars().count()
|
|
||||||
+ mode_shortcut_text.chars().count()
|
|
||||||
+ ARROW_SEPARATOR.chars().count();
|
|
||||||
(
|
|
||||||
format!(
|
|
||||||
"{}{}{}{}{}{}{}",
|
|
||||||
locked,
|
|
||||||
locked_separator,
|
|
||||||
superkey,
|
|
||||||
first_superkey_separator,
|
|
||||||
second_superkey_separator,
|
|
||||||
mode_shortcut,
|
|
||||||
mode_shortcut_separator
|
|
||||||
),
|
|
||||||
len,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
(InputMode::Tab, false) => {
|
|
||||||
let mode_shortcut_text = "t ";
|
let mode_shortcut_text = "t ";
|
||||||
let superkey = superkey_text.bold().on_magenta();
|
let superkey = superkey_text.bold().on_magenta();
|
||||||
let first_superkey_separator = ARROW_SEPARATOR.magenta().on_black();
|
let first_superkey_separator = ARROW_SEPARATOR.magenta().on_black();
|
||||||
|
|
@ -210,37 +128,7 @@ fn key_path(help: &Help) -> LinePart {
|
||||||
len,
|
len,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
(InputMode::Tab, true) => {
|
InputMode::Scroll => {
|
||||||
let mode_shortcut_text = "t ";
|
|
||||||
let locked = locked_text.white().bold().on_yellow();
|
|
||||||
let locked_separator = ARROW_SEPARATOR.yellow().on_magenta();
|
|
||||||
let superkey = superkey_text.bold().on_magenta();
|
|
||||||
let first_superkey_separator = ARROW_SEPARATOR.magenta().on_black();
|
|
||||||
let second_superkey_separator = ARROW_SEPARATOR.black().on_magenta();
|
|
||||||
let mode_shortcut = mode_shortcut_text.white().bold().on_magenta();
|
|
||||||
let mode_shortcut_separator = ARROW_SEPARATOR.magenta().on_black();
|
|
||||||
let len = locked_text.chars().count()
|
|
||||||
+ ARROW_SEPARATOR.chars().count()
|
|
||||||
+ superkey_text.chars().count()
|
|
||||||
+ ARROW_SEPARATOR.chars().count()
|
|
||||||
+ ARROW_SEPARATOR.chars().count()
|
|
||||||
+ mode_shortcut_text.chars().count()
|
|
||||||
+ ARROW_SEPARATOR.chars().count();
|
|
||||||
(
|
|
||||||
format!(
|
|
||||||
"{}{}{}{}{}{}{}",
|
|
||||||
locked,
|
|
||||||
locked_separator,
|
|
||||||
superkey,
|
|
||||||
first_superkey_separator,
|
|
||||||
second_superkey_separator,
|
|
||||||
mode_shortcut,
|
|
||||||
mode_shortcut_separator
|
|
||||||
),
|
|
||||||
len,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
(InputMode::Scroll, false) => {
|
|
||||||
let mode_shortcut_text = "s ";
|
let mode_shortcut_text = "s ";
|
||||||
let superkey = superkey_text.bold().on_magenta();
|
let superkey = superkey_text.bold().on_magenta();
|
||||||
let first_superkey_separator = ARROW_SEPARATOR.magenta().on_black();
|
let first_superkey_separator = ARROW_SEPARATOR.magenta().on_black();
|
||||||
|
|
@ -264,37 +152,7 @@ fn key_path(help: &Help) -> LinePart {
|
||||||
len,
|
len,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
(InputMode::Scroll, true) => {
|
InputMode::Normal | _ => {
|
||||||
let mode_shortcut_text = "s ";
|
|
||||||
let locked = locked_text.white().bold().on_yellow();
|
|
||||||
let locked_separator = ARROW_SEPARATOR.yellow().on_magenta();
|
|
||||||
let superkey = superkey_text.bold().on_magenta();
|
|
||||||
let first_superkey_separator = ARROW_SEPARATOR.magenta().on_black();
|
|
||||||
let second_superkey_separator = ARROW_SEPARATOR.black().on_magenta();
|
|
||||||
let mode_shortcut = mode_shortcut_text.white().bold().on_magenta();
|
|
||||||
let mode_shortcut_separator = ARROW_SEPARATOR.magenta().on_black();
|
|
||||||
let len = locked_text.chars().count()
|
|
||||||
+ ARROW_SEPARATOR.chars().count()
|
|
||||||
+ superkey_text.chars().count()
|
|
||||||
+ ARROW_SEPARATOR.chars().count()
|
|
||||||
+ ARROW_SEPARATOR.chars().count()
|
|
||||||
+ mode_shortcut_text.chars().count()
|
|
||||||
+ ARROW_SEPARATOR.chars().count();
|
|
||||||
(
|
|
||||||
format!(
|
|
||||||
"{}{}{}{}{}{}{}",
|
|
||||||
locked,
|
|
||||||
locked_separator,
|
|
||||||
superkey,
|
|
||||||
first_superkey_separator,
|
|
||||||
second_superkey_separator,
|
|
||||||
mode_shortcut,
|
|
||||||
mode_shortcut_separator
|
|
||||||
),
|
|
||||||
len,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
(InputMode::Normal, _) | _ => {
|
|
||||||
let key_path = superkey_text.on_green();
|
let key_path = superkey_text.on_green();
|
||||||
let separator = ARROW_SEPARATOR.green().on_black();
|
let separator = ARROW_SEPARATOR.green().on_black();
|
||||||
(
|
(
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
/// This module is for defining the set of actions that can be taken in response to a keybind
|
/// This module is for defining the set of actions that can be taken in
|
||||||
/// and also passing actions back to the handler for dispatch.
|
/// response to a keybind and also passing actions back to the handler
|
||||||
|
/// for dispatch.
|
||||||
use super::handler;
|
use super::handler;
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
|
|
@ -12,36 +13,35 @@ pub enum Direction {
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub enum Action {
|
pub enum Action {
|
||||||
/// Quit Zellij
|
/// Quit Zellij.
|
||||||
Quit,
|
Quit,
|
||||||
/// Write to terminal
|
/// Write to the terminal.
|
||||||
Write(Vec<u8>),
|
Write(Vec<u8>),
|
||||||
/// Switch to the specified input mode
|
/// Switch to the specified input mode.
|
||||||
SwitchToMode(handler::InputMode),
|
SwitchToMode(handler::InputMode),
|
||||||
TogglePersistentMode,
|
/// Resize focus pane in specified direction.
|
||||||
/// Resize focus pane in specified direction
|
|
||||||
Resize(Direction),
|
Resize(Direction),
|
||||||
/// Switch focus to next pane in specified direction
|
/// Switch focus to next pane in specified direction.
|
||||||
SwitchFocus(Direction),
|
SwitchFocus(Direction),
|
||||||
/// Move the focus pane in specified direction
|
/// Move the focus pane in specified direction.
|
||||||
MoveFocus(Direction),
|
MoveFocus(Direction),
|
||||||
/// Scroll up in focus pane
|
/// Scroll up in focus pane.
|
||||||
ScrollUp,
|
ScrollUp,
|
||||||
/// Scroll down in focus pane
|
/// Scroll down in focus pane.
|
||||||
ScrollDown,
|
ScrollDown,
|
||||||
/// Toggle focus pane between fullscreen and normal layout
|
/// Toggle between fullscreen focus pane and normal layout.
|
||||||
ToggleFocusFullscreen,
|
ToggleFocusFullscreen,
|
||||||
/// Open a new pane in specified direction (relative to focus)
|
/// Open a new pane in the specified direction (relative to focus).
|
||||||
/// If no direction is specified, will try to use the biggest available space
|
/// If no direction is specified, will try to use the biggest available space.
|
||||||
NewPane(Option<Direction>),
|
NewPane(Option<Direction>),
|
||||||
/// Close focus pane
|
/// Close the focus pane.
|
||||||
CloseFocus,
|
CloseFocus,
|
||||||
// Create a new tab
|
/// Create a new tab.
|
||||||
NewTab,
|
NewTab,
|
||||||
// Go to next tab
|
/// Go to the next tab.
|
||||||
GoToNextTab,
|
GoToNextTab,
|
||||||
// Go to previous tab
|
/// Go to the previous tab.
|
||||||
GoToPreviousTab,
|
GoToPreviousTab,
|
||||||
// Close the current tab
|
/// Close the current tab.
|
||||||
CloseTab,
|
CloseTab,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,11 +13,12 @@ use serde::{Deserialize, Serialize};
|
||||||
use strum_macros::EnumIter;
|
use strum_macros::EnumIter;
|
||||||
use termion::input::TermReadEventsAndRaw;
|
use termion::input::TermReadEventsAndRaw;
|
||||||
|
|
||||||
use super::keybinds::key_to_action;
|
use super::keybinds::key_to_actions;
|
||||||
|
|
||||||
|
/// Handles the dispatching of [`Action`]s according to the current
|
||||||
|
/// [`InputMode`], as well as changes to that mode.
|
||||||
struct InputHandler {
|
struct InputHandler {
|
||||||
mode: InputMode,
|
mode: InputMode,
|
||||||
mode_is_persistent: bool,
|
|
||||||
os_input: Box<dyn OsApi>,
|
os_input: Box<dyn OsApi>,
|
||||||
command_is_executing: CommandIsExecuting,
|
command_is_executing: CommandIsExecuting,
|
||||||
send_screen_instructions: SenderWithContext<ScreenInstruction>,
|
send_screen_instructions: SenderWithContext<ScreenInstruction>,
|
||||||
|
|
@ -37,7 +38,6 @@ impl InputHandler {
|
||||||
) -> Self {
|
) -> Self {
|
||||||
InputHandler {
|
InputHandler {
|
||||||
mode: InputMode::Normal,
|
mode: InputMode::Normal,
|
||||||
mode_is_persistent: false,
|
|
||||||
os_input,
|
os_input,
|
||||||
command_is_executing,
|
command_is_executing,
|
||||||
send_screen_instructions,
|
send_screen_instructions,
|
||||||
|
|
@ -47,7 +47,9 @@ impl InputHandler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Main event loop
|
/// Main event loop. Interprets the terminal [`Event`](termion::event::Event)s
|
||||||
|
/// as [`Action`]s according to the current [`InputMode`], and dispatches those
|
||||||
|
/// actions.
|
||||||
fn get_input(&mut self) {
|
fn get_input(&mut self) {
|
||||||
let mut err_ctx = OPENCALLS.with(|ctx| *ctx.borrow());
|
let mut err_ctx = OPENCALLS.with(|ctx| *ctx.borrow());
|
||||||
err_ctx.add_call(ContextType::StdinHandler);
|
err_ctx.add_call(ContextType::StdinHandler);
|
||||||
|
|
@ -56,7 +58,6 @@ impl InputHandler {
|
||||||
self.send_screen_instructions.update(err_ctx);
|
self.send_screen_instructions.update(err_ctx);
|
||||||
if let Ok(keybinds) = get_default_keybinds() {
|
if let Ok(keybinds) = get_default_keybinds() {
|
||||||
'input_loop: loop {
|
'input_loop: loop {
|
||||||
let entry_mode = self.mode;
|
|
||||||
//@@@ I think this should actually just iterate over stdin directly
|
//@@@ I think this should actually just iterate over stdin directly
|
||||||
let stdin_buffer = self.os_input.read_from_stdin();
|
let stdin_buffer = self.os_input.read_from_stdin();
|
||||||
drop(
|
drop(
|
||||||
|
|
@ -67,20 +68,19 @@ impl InputHandler {
|
||||||
match key_result {
|
match key_result {
|
||||||
Ok((event, raw_bytes)) => match event {
|
Ok((event, raw_bytes)) => match event {
|
||||||
termion::event::Event::Key(key) => {
|
termion::event::Event::Key(key) => {
|
||||||
let should_break = self.dispatch_action(key_to_action(
|
// FIXME this explicit break is needed because the current test
|
||||||
&key, raw_bytes, &self.mode, &keybinds,
|
// framework relies on it to not create dead threads that loop
|
||||||
));
|
// and eat up CPUs. Do not remove until the test framework has
|
||||||
//@@@ This is a hack until we dispatch more than one action per key stroke
|
// been revised. Sorry about this (@categorille)
|
||||||
if entry_mode == self.mode && !self.mode_is_persistent {
|
if {
|
||||||
self.mode = InputMode::Normal;
|
let mut should_break = false;
|
||||||
update_state(&self.send_app_instructions, |_| AppState {
|
for action in
|
||||||
input_state: InputState {
|
key_to_actions(&key, raw_bytes, &self.mode, &keybinds)
|
||||||
mode: self.mode,
|
{
|
||||||
persistent: self.mode_is_persistent,
|
should_break |= self.dispatch_action(action);
|
||||||
},
|
}
|
||||||
});
|
should_break
|
||||||
}
|
} {
|
||||||
if should_break {
|
|
||||||
break 'input_loop;
|
break 'input_loop;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -100,7 +100,7 @@ impl InputHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn dispatch_action(&mut self, action: Action) -> bool {
|
fn dispatch_action(&mut self, action: Action) -> bool {
|
||||||
let mut interrupt_loop = false;
|
let mut should_break = false;
|
||||||
|
|
||||||
match action {
|
match action {
|
||||||
Action::Write(val) => {
|
Action::Write(val) => {
|
||||||
|
|
@ -113,32 +113,17 @@ impl InputHandler {
|
||||||
}
|
}
|
||||||
Action::Quit => {
|
Action::Quit => {
|
||||||
self.exit();
|
self.exit();
|
||||||
interrupt_loop = true;
|
should_break = true;
|
||||||
}
|
}
|
||||||
Action::SwitchToMode(mode) => {
|
Action::SwitchToMode(mode) => {
|
||||||
self.mode = mode;
|
self.mode = mode;
|
||||||
if mode == InputMode::Normal {
|
|
||||||
self.mode_is_persistent = false;
|
|
||||||
}
|
|
||||||
update_state(&self.send_app_instructions, |_| AppState {
|
update_state(&self.send_app_instructions, |_| AppState {
|
||||||
input_state: InputState {
|
input_mode: self.mode,
|
||||||
mode: self.mode,
|
|
||||||
persistent: self.mode_is_persistent,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
self.send_screen_instructions
|
self.send_screen_instructions
|
||||||
.send(ScreenInstruction::Render)
|
.send(ScreenInstruction::Render)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
}
|
||||||
Action::TogglePersistentMode => {
|
|
||||||
self.mode_is_persistent = !self.mode_is_persistent;
|
|
||||||
update_state(&self.send_app_instructions, |_| AppState {
|
|
||||||
input_state: InputState {
|
|
||||||
mode: self.mode,
|
|
||||||
persistent: self.mode_is_persistent,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
Action::Resize(direction) => {
|
Action::Resize(direction) => {
|
||||||
let screen_instr = match direction {
|
let screen_instr = match direction {
|
||||||
super::actions::Direction::Left => ScreenInstruction::ResizeLeft,
|
super::actions::Direction::Left => ScreenInstruction::ResizeLeft,
|
||||||
|
|
@ -231,7 +216,7 @@ impl InputHandler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
interrupt_loop
|
should_break
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Routine to be called when the input handler exits (at the moment this is the
|
/// Routine to be called when the input handler exits (at the moment this is the
|
||||||
|
|
@ -243,28 +228,14 @@ impl InputHandler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Eq, Hash, Copy, Clone, Serialize, Deserialize)]
|
/// Dictates the input mode, which is the way that keystrokes will be interpreted:
|
||||||
pub struct InputState {
|
/// - Normal mode either writes characters to the terminal, or switches to Command mode
|
||||||
mode: InputMode,
|
|
||||||
persistent: bool,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Default for InputState {
|
|
||||||
fn default() -> InputState {
|
|
||||||
InputState {
|
|
||||||
mode: InputMode::Normal,
|
|
||||||
persistent: false,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Dictates whether we're in command mode, persistent command mode, normal mode or exiting:
|
|
||||||
/// - Normal mode either writes characters to the terminal, or switches to command mode
|
|
||||||
/// using a particular key control
|
/// using a particular key control
|
||||||
/// - Command mode intercepts characters to control zellij itself, before switching immediately
|
/// - Command mode is a menu that allows choosing another mode, like Resize or Pane
|
||||||
/// back to normal mode
|
/// - Resize mode is for resizing the different panes already present
|
||||||
/// - Persistent command mode is the same as command mode, but doesn't return automatically to
|
/// - Pane mode is for creating and closing panes in different directions
|
||||||
/// normal mode
|
/// - Tab mode is for creating tabs and moving between them
|
||||||
|
/// - Scroll mode is for scrolling up and down within a pane
|
||||||
#[derive(Debug, PartialEq, Eq, Hash, Copy, Clone, EnumIter, Serialize, Deserialize)]
|
#[derive(Debug, PartialEq, Eq, Hash, Copy, Clone, EnumIter, Serialize, Deserialize)]
|
||||||
pub enum InputMode {
|
pub enum InputMode {
|
||||||
Normal,
|
Normal,
|
||||||
|
|
@ -276,10 +247,12 @@ pub enum InputMode {
|
||||||
Exiting,
|
Exiting,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Represents the help message that is printed in the status bar, indicating
|
||||||
|
/// the current [`InputMode`], whether that mode is persistent, and what the
|
||||||
|
/// keybinds for that mode are.
|
||||||
#[derive(Default, Debug, Clone, Serialize, Deserialize)]
|
#[derive(Default, Debug, Clone, Serialize, Deserialize)]
|
||||||
pub struct Help {
|
pub struct Help {
|
||||||
pub mode: InputMode,
|
pub mode: InputMode,
|
||||||
pub mode_is_persistent: bool,
|
|
||||||
pub keybinds: Vec<(String, String)>, // <shortcut> => <shortcut description>
|
pub keybinds: Vec<(String, String)>, // <shortcut> => <shortcut description>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -289,46 +262,45 @@ impl Default for InputMode {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_help(input_state: &InputState) -> Help {
|
/// Creates a [`Help`] struct holding the current [`InputMode`] and its keybinds.
|
||||||
|
// TODO this should probably be automatically generated in some way
|
||||||
|
pub fn get_help(mode: InputMode) -> Help {
|
||||||
let mut keybinds: Vec<(String, String)> = vec![];
|
let mut keybinds: Vec<(String, String)> = vec![];
|
||||||
match input_state.mode {
|
match mode {
|
||||||
InputMode::Normal | InputMode::Command | InputMode::Exiting => {
|
InputMode::Normal | InputMode::Command | InputMode::Exiting => {
|
||||||
keybinds.push((format!("p"), format!("Pane mode")));
|
keybinds.push((format!("p"), format!("PANE")));
|
||||||
keybinds.push((format!("t"), format!("Tab mode")));
|
keybinds.push((format!("t"), format!("TAB")));
|
||||||
keybinds.push((format!("r"), format!("Resize mode")));
|
keybinds.push((format!("r"), format!("RESIZE")));
|
||||||
|
keybinds.push((format!("s"), format!("SCROLL")));
|
||||||
}
|
}
|
||||||
InputMode::Resize => {
|
InputMode::Resize => {
|
||||||
keybinds.push((format!("←↓↑→"), format!("resize pane")));
|
keybinds.push((format!("←↓↑→"), format!("Resize")));
|
||||||
}
|
}
|
||||||
InputMode::Pane => {
|
InputMode::Pane => {
|
||||||
keybinds.push((format!("←↓↑→"), format!("move focus")));
|
keybinds.push((format!("←↓↑→"), format!("Move focus")));
|
||||||
keybinds.push((format!("p"), format!("next pane")));
|
keybinds.push((format!("p"), format!("Next")));
|
||||||
keybinds.push((format!("n"), format!("new pane")));
|
keybinds.push((format!("n"), format!("New")));
|
||||||
keybinds.push((format!("d"), format!("down split")));
|
keybinds.push((format!("d"), format!("Split down")));
|
||||||
keybinds.push((format!("r"), format!("right split")));
|
keybinds.push((format!("r"), format!("Split right")));
|
||||||
keybinds.push((format!("x"), format!("exit pane")));
|
keybinds.push((format!("x"), format!("Close")));
|
||||||
keybinds.push((format!("f"), format!("fullscreen pane")));
|
keybinds.push((format!("f"), format!("Fullscreen")));
|
||||||
}
|
}
|
||||||
InputMode::Tab => {
|
InputMode::Tab => {
|
||||||
keybinds.push((format!("←↓↑→"), format!("move tab focus")));
|
keybinds.push((format!("←↓↑→"), format!("Move focus")));
|
||||||
keybinds.push((format!("n"), format!("new tab")));
|
keybinds.push((format!("n"), format!("New")));
|
||||||
keybinds.push((format!("x"), format!("exit tab")));
|
keybinds.push((format!("x"), format!("Close")));
|
||||||
}
|
}
|
||||||
InputMode::Scroll => {
|
InputMode::Scroll => {
|
||||||
keybinds.push((format!("↓↑"), format!("scroll up/down")));
|
keybinds.push((format!("↓↑"), format!("Scroll")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
keybinds.push((format!("ESC"), format!("Back")));
|
keybinds.push((format!("ESC"), format!("BACK")));
|
||||||
keybinds.push((format!("q"), format!("Quit")));
|
keybinds.push((format!("q"), format!("QUIT")));
|
||||||
Help {
|
Help { mode, keybinds }
|
||||||
mode: input_state.mode,
|
|
||||||
mode_is_persistent: input_state.persistent,
|
|
||||||
keybinds,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Entry point to the module that instantiates a new InputHandler and calls its
|
/// Entry point to the module. Instantiates a new InputHandler and calls its
|
||||||
/// reading loop
|
/// input loop.
|
||||||
pub fn input_loop(
|
pub fn input_loop(
|
||||||
os_input: Box<dyn OsApi>,
|
os_input: Box<dyn OsApi>,
|
||||||
command_is_executing: CommandIsExecuting,
|
command_is_executing: CommandIsExecuting,
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// This module is for mapping particular input keys to their corresponding actions.
|
//! Mapping of inputs to sequences of actions
|
||||||
|
|
||||||
use super::actions::{Action, Direction};
|
use super::actions::{Action, Direction};
|
||||||
use super::handler::InputMode;
|
use super::handler::InputMode;
|
||||||
|
|
@ -9,9 +9,9 @@ use strum::IntoEnumIterator;
|
||||||
use termion::event::Key;
|
use termion::event::Key;
|
||||||
|
|
||||||
type Keybinds = HashMap<InputMode, ModeKeybinds>;
|
type Keybinds = HashMap<InputMode, ModeKeybinds>;
|
||||||
type ModeKeybinds = HashMap<Key, Action>;
|
type ModeKeybinds = HashMap<Key, Vec<Action>>;
|
||||||
|
|
||||||
/// Populate the default hashmap of keybinds
|
/// Populates the default hashmap of keybinds.
|
||||||
/// @@@khs26 What about an input config file?
|
/// @@@khs26 What about an input config file?
|
||||||
pub fn get_default_keybinds() -> Result<Keybinds, String> {
|
pub fn get_default_keybinds() -> Result<Keybinds, String> {
|
||||||
let mut defaults = Keybinds::new();
|
let mut defaults = Keybinds::new();
|
||||||
|
|
@ -23,106 +23,134 @@ pub fn get_default_keybinds() -> Result<Keybinds, String> {
|
||||||
Ok(defaults)
|
Ok(defaults)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns the default keybinds for a givent [`InputMode`].
|
||||||
fn get_defaults_for_mode(mode: &InputMode) -> Result<ModeKeybinds, String> {
|
fn get_defaults_for_mode(mode: &InputMode) -> Result<ModeKeybinds, String> {
|
||||||
let mut defaults = ModeKeybinds::new();
|
let mut defaults = ModeKeybinds::new();
|
||||||
|
|
||||||
match *mode {
|
match *mode {
|
||||||
InputMode::Normal => {
|
InputMode::Normal => {
|
||||||
defaults.insert(Key::Ctrl('g'), Action::SwitchToMode(InputMode::Command));
|
defaults.insert(
|
||||||
|
Key::Ctrl('g'),
|
||||||
|
vec![Action::SwitchToMode(InputMode::Command)],
|
||||||
|
);
|
||||||
}
|
}
|
||||||
InputMode::Command => {
|
InputMode::Command => {
|
||||||
defaults.insert(Key::Char('r'), Action::SwitchToMode(InputMode::Resize));
|
defaults.insert(
|
||||||
defaults.insert(Key::Char('p'), Action::SwitchToMode(InputMode::Pane));
|
Key::Char('r'),
|
||||||
defaults.insert(Key::Char('t'), Action::SwitchToMode(InputMode::Tab));
|
vec![Action::SwitchToMode(InputMode::Resize)],
|
||||||
defaults.insert(Key::Char('s'), Action::SwitchToMode(InputMode::Scroll));
|
);
|
||||||
defaults.insert(Key::Ctrl('g'), Action::TogglePersistentMode);
|
defaults.insert(Key::Char('p'), vec![Action::SwitchToMode(InputMode::Pane)]);
|
||||||
defaults.insert(Key::Esc, Action::SwitchToMode(InputMode::Normal));
|
defaults.insert(Key::Char('t'), vec![Action::SwitchToMode(InputMode::Tab)]);
|
||||||
defaults.insert(Key::Char('q'), Action::Quit);
|
defaults.insert(
|
||||||
|
Key::Char('s'),
|
||||||
|
vec![Action::SwitchToMode(InputMode::Scroll)],
|
||||||
|
);
|
||||||
|
defaults.insert(
|
||||||
|
Key::Ctrl('g'),
|
||||||
|
vec![Action::SwitchToMode(InputMode::Normal)],
|
||||||
|
);
|
||||||
|
defaults.insert(Key::Esc, vec![Action::SwitchToMode(InputMode::Normal)]);
|
||||||
|
defaults.insert(Key::Char('q'), vec![Action::Quit]);
|
||||||
}
|
}
|
||||||
InputMode::Resize => {
|
InputMode::Resize => {
|
||||||
defaults.insert(Key::Char('h'), Action::Resize(Direction::Left));
|
defaults.insert(Key::Char('h'), vec![Action::Resize(Direction::Left)]);
|
||||||
defaults.insert(Key::Char('j'), Action::Resize(Direction::Down));
|
defaults.insert(Key::Char('j'), vec![Action::Resize(Direction::Down)]);
|
||||||
defaults.insert(Key::Char('k'), Action::Resize(Direction::Up));
|
defaults.insert(Key::Char('k'), vec![Action::Resize(Direction::Up)]);
|
||||||
defaults.insert(Key::Char('l'), Action::Resize(Direction::Right));
|
defaults.insert(Key::Char('l'), vec![Action::Resize(Direction::Right)]);
|
||||||
|
|
||||||
defaults.insert(Key::Left, Action::Resize(Direction::Left));
|
defaults.insert(Key::Left, vec![Action::Resize(Direction::Left)]);
|
||||||
defaults.insert(Key::Down, Action::Resize(Direction::Down));
|
defaults.insert(Key::Down, vec![Action::Resize(Direction::Down)]);
|
||||||
defaults.insert(Key::Up, Action::Resize(Direction::Up));
|
defaults.insert(Key::Up, vec![Action::Resize(Direction::Up)]);
|
||||||
defaults.insert(Key::Right, Action::Resize(Direction::Right));
|
defaults.insert(Key::Right, vec![Action::Resize(Direction::Right)]);
|
||||||
|
|
||||||
defaults.insert(Key::Ctrl('b'), Action::Resize(Direction::Left));
|
defaults.insert(Key::Ctrl('b'), vec![Action::Resize(Direction::Left)]);
|
||||||
defaults.insert(Key::Ctrl('n'), Action::Resize(Direction::Down));
|
defaults.insert(Key::Ctrl('n'), vec![Action::Resize(Direction::Down)]);
|
||||||
defaults.insert(Key::Ctrl('p'), Action::Resize(Direction::Up));
|
defaults.insert(Key::Ctrl('p'), vec![Action::Resize(Direction::Up)]);
|
||||||
defaults.insert(Key::Ctrl('f'), Action::Resize(Direction::Right));
|
defaults.insert(Key::Ctrl('f'), vec![Action::Resize(Direction::Right)]);
|
||||||
|
|
||||||
defaults.insert(Key::Char('q'), Action::Quit);
|
defaults.insert(Key::Char('q'), vec![Action::Quit]);
|
||||||
defaults.insert(Key::Ctrl('g'), Action::TogglePersistentMode);
|
defaults.insert(
|
||||||
defaults.insert(Key::Esc, Action::SwitchToMode(InputMode::Normal));
|
Key::Ctrl('g'),
|
||||||
|
vec![Action::SwitchToMode(InputMode::Normal)],
|
||||||
|
);
|
||||||
|
defaults.insert(Key::Esc, vec![Action::SwitchToMode(InputMode::Command)]);
|
||||||
}
|
}
|
||||||
InputMode::Pane => {
|
InputMode::Pane => {
|
||||||
defaults.insert(Key::Char('h'), Action::MoveFocus(Direction::Left));
|
defaults.insert(Key::Char('h'), vec![Action::MoveFocus(Direction::Left)]);
|
||||||
defaults.insert(Key::Char('j'), Action::MoveFocus(Direction::Down));
|
defaults.insert(Key::Char('j'), vec![Action::MoveFocus(Direction::Down)]);
|
||||||
defaults.insert(Key::Char('k'), Action::MoveFocus(Direction::Up));
|
defaults.insert(Key::Char('k'), vec![Action::MoveFocus(Direction::Up)]);
|
||||||
defaults.insert(Key::Char('l'), Action::MoveFocus(Direction::Right));
|
defaults.insert(Key::Char('l'), vec![Action::MoveFocus(Direction::Right)]);
|
||||||
|
|
||||||
defaults.insert(Key::Left, Action::MoveFocus(Direction::Left));
|
defaults.insert(Key::Left, vec![Action::MoveFocus(Direction::Left)]);
|
||||||
defaults.insert(Key::Down, Action::MoveFocus(Direction::Down));
|
defaults.insert(Key::Down, vec![Action::MoveFocus(Direction::Down)]);
|
||||||
defaults.insert(Key::Up, Action::MoveFocus(Direction::Up));
|
defaults.insert(Key::Up, vec![Action::MoveFocus(Direction::Up)]);
|
||||||
defaults.insert(Key::Right, Action::MoveFocus(Direction::Right));
|
defaults.insert(Key::Right, vec![Action::MoveFocus(Direction::Right)]);
|
||||||
|
|
||||||
defaults.insert(Key::Ctrl('b'), Action::MoveFocus(Direction::Left));
|
defaults.insert(Key::Ctrl('b'), vec![Action::MoveFocus(Direction::Left)]);
|
||||||
defaults.insert(Key::Ctrl('n'), Action::MoveFocus(Direction::Down));
|
defaults.insert(Key::Ctrl('n'), vec![Action::MoveFocus(Direction::Down)]);
|
||||||
defaults.insert(Key::Ctrl('p'), Action::MoveFocus(Direction::Up));
|
defaults.insert(Key::Ctrl('p'), vec![Action::MoveFocus(Direction::Up)]);
|
||||||
defaults.insert(Key::Ctrl('f'), Action::MoveFocus(Direction::Right));
|
defaults.insert(Key::Ctrl('f'), vec![Action::MoveFocus(Direction::Right)]);
|
||||||
|
|
||||||
defaults.insert(Key::Char('p'), Action::SwitchFocus(Direction::Right));
|
defaults.insert(Key::Char('p'), vec![Action::SwitchFocus(Direction::Right)]);
|
||||||
defaults.insert(Key::Char('n'), Action::NewPane(None));
|
defaults.insert(Key::Char('n'), vec![Action::NewPane(None)]);
|
||||||
defaults.insert(Key::Char('d'), Action::NewPane(Some(Direction::Down)));
|
defaults.insert(Key::Char('d'), vec![Action::NewPane(Some(Direction::Down))]);
|
||||||
defaults.insert(Key::Char('r'), Action::NewPane(Some(Direction::Right)));
|
defaults.insert(
|
||||||
defaults.insert(Key::Char('x'), Action::CloseFocus);
|
Key::Char('r'),
|
||||||
|
vec![Action::NewPane(Some(Direction::Right))],
|
||||||
|
);
|
||||||
|
defaults.insert(Key::Char('x'), vec![Action::CloseFocus]);
|
||||||
|
|
||||||
defaults.insert(Key::Char('f'), Action::ToggleFocusFullscreen);
|
defaults.insert(Key::Char('f'), vec![Action::ToggleFocusFullscreen]);
|
||||||
|
|
||||||
defaults.insert(Key::Char('q'), Action::Quit);
|
defaults.insert(Key::Char('q'), vec![Action::Quit]);
|
||||||
defaults.insert(Key::Ctrl('g'), Action::TogglePersistentMode);
|
defaults.insert(
|
||||||
defaults.insert(Key::Esc, Action::SwitchToMode(InputMode::Normal));
|
Key::Ctrl('g'),
|
||||||
|
vec![Action::SwitchToMode(InputMode::Normal)],
|
||||||
|
);
|
||||||
|
defaults.insert(Key::Esc, vec![Action::SwitchToMode(InputMode::Command)]);
|
||||||
}
|
}
|
||||||
InputMode::Tab => {
|
InputMode::Tab => {
|
||||||
defaults.insert(Key::Char('h'), Action::GoToPreviousTab);
|
defaults.insert(Key::Char('h'), vec![Action::GoToPreviousTab]);
|
||||||
defaults.insert(Key::Char('j'), Action::GoToNextTab);
|
defaults.insert(Key::Char('j'), vec![Action::GoToNextTab]);
|
||||||
defaults.insert(Key::Char('k'), Action::GoToPreviousTab);
|
defaults.insert(Key::Char('k'), vec![Action::GoToPreviousTab]);
|
||||||
defaults.insert(Key::Char('l'), Action::GoToNextTab);
|
defaults.insert(Key::Char('l'), vec![Action::GoToNextTab]);
|
||||||
|
|
||||||
defaults.insert(Key::Left, Action::GoToPreviousTab);
|
defaults.insert(Key::Left, vec![Action::GoToPreviousTab]);
|
||||||
defaults.insert(Key::Down, Action::GoToNextTab);
|
defaults.insert(Key::Down, vec![Action::GoToNextTab]);
|
||||||
defaults.insert(Key::Up, Action::GoToPreviousTab);
|
defaults.insert(Key::Up, vec![Action::GoToPreviousTab]);
|
||||||
defaults.insert(Key::Right, Action::GoToNextTab);
|
defaults.insert(Key::Right, vec![Action::GoToNextTab]);
|
||||||
|
|
||||||
defaults.insert(Key::Ctrl('b'), Action::GoToPreviousTab);
|
defaults.insert(Key::Ctrl('b'), vec![Action::GoToPreviousTab]);
|
||||||
defaults.insert(Key::Ctrl('n'), Action::GoToNextTab);
|
defaults.insert(Key::Ctrl('n'), vec![Action::GoToNextTab]);
|
||||||
defaults.insert(Key::Ctrl('p'), Action::GoToPreviousTab);
|
defaults.insert(Key::Ctrl('p'), vec![Action::GoToPreviousTab]);
|
||||||
defaults.insert(Key::Ctrl('f'), Action::GoToNextTab);
|
defaults.insert(Key::Ctrl('f'), vec![Action::GoToNextTab]);
|
||||||
|
|
||||||
defaults.insert(Key::Char('n'), Action::NewTab);
|
defaults.insert(Key::Char('n'), vec![Action::NewTab]);
|
||||||
defaults.insert(Key::Char('x'), Action::CloseTab);
|
defaults.insert(Key::Char('x'), vec![Action::CloseTab]);
|
||||||
|
|
||||||
defaults.insert(Key::Char('q'), Action::Quit);
|
defaults.insert(Key::Char('q'), vec![Action::Quit]);
|
||||||
defaults.insert(Key::Ctrl('g'), Action::TogglePersistentMode);
|
defaults.insert(
|
||||||
defaults.insert(Key::Esc, Action::SwitchToMode(InputMode::Normal));
|
Key::Ctrl('g'),
|
||||||
|
vec![Action::SwitchToMode(InputMode::Normal)],
|
||||||
|
);
|
||||||
|
defaults.insert(Key::Esc, vec![Action::SwitchToMode(InputMode::Command)]);
|
||||||
}
|
}
|
||||||
InputMode::Scroll => {
|
InputMode::Scroll => {
|
||||||
defaults.insert(Key::Char('j'), Action::ScrollDown);
|
defaults.insert(Key::Char('j'), vec![Action::ScrollDown]);
|
||||||
defaults.insert(Key::Char('k'), Action::ScrollUp);
|
defaults.insert(Key::Char('k'), vec![Action::ScrollUp]);
|
||||||
|
|
||||||
defaults.insert(Key::Down, Action::ScrollDown);
|
defaults.insert(Key::Down, vec![Action::ScrollDown]);
|
||||||
defaults.insert(Key::Up, Action::ScrollUp);
|
defaults.insert(Key::Up, vec![Action::ScrollUp]);
|
||||||
|
|
||||||
defaults.insert(Key::Ctrl('n'), Action::ScrollDown);
|
defaults.insert(Key::Ctrl('n'), vec![Action::ScrollDown]);
|
||||||
defaults.insert(Key::Ctrl('p'), Action::ScrollUp);
|
defaults.insert(Key::Ctrl('p'), vec![Action::ScrollUp]);
|
||||||
|
|
||||||
defaults.insert(Key::Char('q'), Action::Quit);
|
defaults.insert(Key::Char('q'), vec![Action::Quit]);
|
||||||
defaults.insert(Key::Ctrl('g'), Action::TogglePersistentMode);
|
defaults.insert(
|
||||||
defaults.insert(Key::Esc, Action::SwitchToMode(InputMode::Normal));
|
Key::Ctrl('g'),
|
||||||
|
vec![Action::SwitchToMode(InputMode::Normal)],
|
||||||
|
);
|
||||||
|
defaults.insert(Key::Esc, vec![Action::SwitchToMode(InputMode::Command)]);
|
||||||
}
|
}
|
||||||
InputMode::Exiting => {}
|
InputMode::Exiting => {}
|
||||||
}
|
}
|
||||||
|
|
@ -130,14 +158,23 @@ fn get_defaults_for_mode(mode: &InputMode) -> Result<ModeKeybinds, String> {
|
||||||
Ok(defaults)
|
Ok(defaults)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn key_to_action(key: &Key, input: Vec<u8>, mode: &InputMode, keybinds: &Keybinds) -> Action {
|
/// Converts a [`Key`] terminal event to a sequence of [`Action`]s according to the current
|
||||||
|
/// [`InputMode`] and [`Keybinds`].
|
||||||
|
pub fn key_to_actions(
|
||||||
|
key: &Key,
|
||||||
|
input: Vec<u8>,
|
||||||
|
mode: &InputMode,
|
||||||
|
keybinds: &Keybinds,
|
||||||
|
) -> Vec<Action> {
|
||||||
if let Some(mode_keybinds) = keybinds.get(mode) {
|
if let Some(mode_keybinds) = keybinds.get(mode) {
|
||||||
mode_keybinds
|
mode_keybinds
|
||||||
.get(key)
|
.get(key)
|
||||||
.cloned()
|
.cloned()
|
||||||
.unwrap_or(Action::Write(input))
|
// FIXME in command mode, unbound keystrokes should probably do nothing instead of
|
||||||
|
// writing to the terminal. Will be easier to implement after a big refactor of the
|
||||||
|
// input system (@categorille)
|
||||||
|
.unwrap_or(vec![Action::Write(input)])
|
||||||
} else {
|
} else {
|
||||||
// Unrecognized mode - panic?
|
unreachable!("Unrecognized mode: {:?}", mode);
|
||||||
panic!("Unrecognized mode: {:?}", mode);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ use std::{collections::HashMap, fs};
|
||||||
|
|
||||||
use crate::panes::PaneId;
|
use crate::panes::PaneId;
|
||||||
use directories_next::ProjectDirs;
|
use directories_next::ProjectDirs;
|
||||||
use input::handler::InputState;
|
use input::handler::InputMode;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use termion::input::TermRead;
|
use termion::input::TermRead;
|
||||||
use wasm_vm::PluginEnv;
|
use wasm_vm::PluginEnv;
|
||||||
|
|
@ -45,7 +45,7 @@ pub enum ApiCommand {
|
||||||
// FIXME: It would be good to add some more things to this over time
|
// FIXME: It would be good to add some more things to this over time
|
||||||
#[derive(Debug, Clone, Default)]
|
#[derive(Debug, Clone, Default)]
|
||||||
pub struct AppState {
|
pub struct AppState {
|
||||||
pub input_state: InputState,
|
pub input_mode: InputMode,
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: Make this a method on the big `Communication` struct, so that app_tx can be extracted
|
// FIXME: Make this a method on the big `Communication` struct, so that app_tx can be extracted
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ fn host_get_help(plugin_env: &PluginEnv) {
|
||||||
.try_send(AppInstruction::GetState(state_tx))
|
.try_send(AppInstruction::GetState(state_tx))
|
||||||
.is_ok()
|
.is_ok()
|
||||||
{
|
{
|
||||||
let help = get_help(&state_rx.recv().unwrap().input_state);
|
let help = get_help(state_rx.recv().unwrap().input_mode);
|
||||||
wasi_write_string(&plugin_env.wasi_env, &serde_json::to_string(&help).unwrap());
|
wasi_write_string(&plugin_env.wasi_env, &serde_json::to_string(&help).unwrap());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ pub fn starts_with_one_terminal() {
|
||||||
y: 0,
|
y: 0,
|
||||||
};
|
};
|
||||||
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(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
|
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &QUIT]);
|
||||||
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
||||||
let output_frames = fake_input_output
|
let output_frames = fake_input_output
|
||||||
.stdout_writer
|
.stdout_writer
|
||||||
|
|
@ -46,7 +46,6 @@ pub fn split_terminals_vertically() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -74,7 +73,6 @@ pub fn split_terminals_horizontally() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
|
|
@ -103,7 +101,6 @@ pub fn split_largest_terminal() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPAWN_TERMINAL_IN_PANE_MODE,
|
&SPAWN_TERMINAL_IN_PANE_MODE,
|
||||||
|
|
@ -133,7 +130,6 @@ pub fn cannot_split_terminals_vertically_when_active_terminal_is_too_small() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -161,7 +157,6 @@ pub fn cannot_split_terminals_horizontally_when_active_terminal_is_too_small() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
|
|
@ -189,7 +184,6 @@ pub fn cannot_split_largest_terminal_when_there_is_no_room() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPAWN_TERMINAL_IN_PANE_MODE,
|
&SPAWN_TERMINAL_IN_PANE_MODE,
|
||||||
|
|
@ -217,14 +211,11 @@ pub fn scrolling_up_inside_a_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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&SCROLL_MODE,
|
&SCROLL_MODE,
|
||||||
&SCROLL_UP_IN_SCROLL_MODE,
|
&SCROLL_UP_IN_SCROLL_MODE,
|
||||||
&SCROLL_UP_IN_SCROLL_MODE,
|
&SCROLL_UP_IN_SCROLL_MODE,
|
||||||
|
|
@ -252,14 +243,11 @@ pub fn scrolling_down_inside_a_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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&SCROLL_MODE,
|
&SCROLL_MODE,
|
||||||
&SCROLL_UP_IN_SCROLL_MODE,
|
&SCROLL_UP_IN_SCROLL_MODE,
|
||||||
&SCROLL_UP_IN_SCROLL_MODE,
|
&SCROLL_UP_IN_SCROLL_MODE,
|
||||||
|
|
@ -291,7 +279,6 @@ pub fn max_panes() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPAWN_TERMINAL_IN_PANE_MODE,
|
&SPAWN_TERMINAL_IN_PANE_MODE,
|
||||||
|
|
@ -324,7 +311,6 @@ pub fn toggle_focused_pane_fullscreen() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPAWN_TERMINAL_IN_PANE_MODE,
|
&SPAWN_TERMINAL_IN_PANE_MODE,
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@ pub fn close_pane_with_another_pane_above_it() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
|
|
@ -71,7 +70,6 @@ pub fn close_pane_with_another_pane_below_it() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
|
|
@ -108,7 +106,6 @@ pub fn close_pane_with_another_pane_to_the_left() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -144,7 +141,6 @@ pub fn close_pane_with_another_pane_to_the_right() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -183,7 +179,6 @@ pub fn close_pane_with_multiple_panes_above_it() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
|
|
@ -225,7 +220,6 @@ pub fn close_pane_with_multiple_panes_below_it() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
|
|
@ -265,7 +259,6 @@ pub fn close_pane_with_multiple_panes_to_the_left() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -307,7 +300,6 @@ pub fn close_pane_with_multiple_panes_to_the_right() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -347,7 +339,6 @@ pub fn close_pane_with_multiple_panes_above_it_away_from_screen_edges() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
|
|
@ -357,23 +348,15 @@ pub fn close_pane_with_multiple_panes_above_it_away_from_screen_edges() {
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
|
|
@ -417,7 +400,6 @@ pub fn close_pane_with_multiple_panes_below_it_away_from_screen_edges() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
|
|
@ -427,23 +409,15 @@ pub fn close_pane_with_multiple_panes_below_it_away_from_screen_edges() {
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_DOWN_IN_RESIZE_MODE,
|
&RESIZE_DOWN_IN_RESIZE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_DOWN_IN_RESIZE_MODE,
|
&RESIZE_DOWN_IN_RESIZE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
|
|
@ -489,7 +463,6 @@ pub fn close_pane_with_multiple_panes_to_the_left_away_from_screen_edges() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -499,23 +472,15 @@ pub fn close_pane_with_multiple_panes_to_the_left_away_from_screen_edges() {
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
|
|
@ -561,7 +526,6 @@ pub fn close_pane_with_multiple_panes_to_the_right_away_from_screen_edges() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -571,23 +535,15 @@ pub fn close_pane_with_multiple_panes_to_the_right_away_from_screen_edges() {
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
|
|
@ -623,7 +579,6 @@ pub fn closing_last_pane_exits_app() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ pub fn run_bandwhich_from_fish_shell() {
|
||||||
};
|
};
|
||||||
let fixture_name = "fish_and_bandwhich";
|
let fixture_name = "fish_and_bandwhich";
|
||||||
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
||||||
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
|
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &QUIT]);
|
||||||
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
||||||
let output_frames = fake_input_output
|
let output_frames = fake_input_output
|
||||||
.stdout_writer
|
.stdout_writer
|
||||||
|
|
@ -62,7 +62,7 @@ pub fn fish_tab_completion_options() {
|
||||||
};
|
};
|
||||||
let fixture_name = "fish_tab_completion_options";
|
let fixture_name = "fish_tab_completion_options";
|
||||||
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
||||||
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
|
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &QUIT]);
|
||||||
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
||||||
let output_frames = fake_input_output
|
let output_frames = fake_input_output
|
||||||
.stdout_writer
|
.stdout_writer
|
||||||
|
|
@ -90,7 +90,7 @@ pub fn fish_select_tab_completion_options() {
|
||||||
};
|
};
|
||||||
let fixture_name = "fish_select_tab_completion_options";
|
let fixture_name = "fish_select_tab_completion_options";
|
||||||
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
||||||
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
|
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &QUIT]);
|
||||||
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
||||||
let output_frames = fake_input_output
|
let output_frames = fake_input_output
|
||||||
.stdout_writer
|
.stdout_writer
|
||||||
|
|
@ -122,7 +122,7 @@ pub fn vim_scroll_region_down() {
|
||||||
};
|
};
|
||||||
let fixture_name = "vim_scroll_region_down";
|
let fixture_name = "vim_scroll_region_down";
|
||||||
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
||||||
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]); // quit (ctrl-q)
|
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &QUIT]); // quit (ctrl-q)
|
||||||
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
||||||
let output_frames = fake_input_output
|
let output_frames = fake_input_output
|
||||||
.stdout_writer
|
.stdout_writer
|
||||||
|
|
@ -151,7 +151,7 @@ pub fn vim_ctrl_d() {
|
||||||
};
|
};
|
||||||
let fixture_name = "vim_ctrl_d";
|
let fixture_name = "vim_ctrl_d";
|
||||||
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
||||||
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
|
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &QUIT]);
|
||||||
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
||||||
let output_frames = fake_input_output
|
let output_frames = fake_input_output
|
||||||
.stdout_writer
|
.stdout_writer
|
||||||
|
|
@ -179,7 +179,7 @@ pub fn vim_ctrl_u() {
|
||||||
};
|
};
|
||||||
let fixture_name = "vim_ctrl_u";
|
let fixture_name = "vim_ctrl_u";
|
||||||
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
||||||
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
|
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &QUIT]);
|
||||||
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
||||||
let output_frames = fake_input_output
|
let output_frames = fake_input_output
|
||||||
.stdout_writer
|
.stdout_writer
|
||||||
|
|
@ -202,7 +202,7 @@ pub fn htop() {
|
||||||
};
|
};
|
||||||
let fixture_name = "htop";
|
let fixture_name = "htop";
|
||||||
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
||||||
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
|
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &QUIT]);
|
||||||
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
||||||
let output_frames = fake_input_output
|
let output_frames = fake_input_output
|
||||||
.stdout_writer
|
.stdout_writer
|
||||||
|
|
@ -225,7 +225,7 @@ pub fn htop_scrolling() {
|
||||||
};
|
};
|
||||||
let fixture_name = "htop_scrolling";
|
let fixture_name = "htop_scrolling";
|
||||||
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
||||||
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
|
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &QUIT]);
|
||||||
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
||||||
let output_frames = fake_input_output
|
let output_frames = fake_input_output
|
||||||
.stdout_writer
|
.stdout_writer
|
||||||
|
|
@ -248,7 +248,7 @@ pub fn htop_right_scrolling() {
|
||||||
};
|
};
|
||||||
let fixture_name = "htop_right_scrolling";
|
let fixture_name = "htop_right_scrolling";
|
||||||
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
||||||
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
|
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &QUIT]);
|
||||||
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
||||||
let output_frames = fake_input_output
|
let output_frames = fake_input_output
|
||||||
.stdout_writer
|
.stdout_writer
|
||||||
|
|
@ -279,7 +279,7 @@ pub fn vim_overwrite() {
|
||||||
};
|
};
|
||||||
let fixture_name = "vim_overwrite";
|
let fixture_name = "vim_overwrite";
|
||||||
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
||||||
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
|
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &QUIT]);
|
||||||
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
||||||
let output_frames = fake_input_output
|
let output_frames = fake_input_output
|
||||||
.stdout_writer
|
.stdout_writer
|
||||||
|
|
@ -305,7 +305,7 @@ pub fn clear_scroll_region() {
|
||||||
};
|
};
|
||||||
let fixture_name = "clear_scroll_region";
|
let fixture_name = "clear_scroll_region";
|
||||||
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
||||||
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
|
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &QUIT]);
|
||||||
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
||||||
let output_frames = fake_input_output
|
let output_frames = fake_input_output
|
||||||
.stdout_writer
|
.stdout_writer
|
||||||
|
|
@ -328,7 +328,7 @@ pub fn display_tab_characters_properly() {
|
||||||
};
|
};
|
||||||
let fixture_name = "tab_characters";
|
let fixture_name = "tab_characters";
|
||||||
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
||||||
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
|
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &QUIT]);
|
||||||
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
||||||
let output_frames = fake_input_output
|
let output_frames = fake_input_output
|
||||||
.stdout_writer
|
.stdout_writer
|
||||||
|
|
@ -351,7 +351,7 @@ pub fn neovim_insert_mode() {
|
||||||
};
|
};
|
||||||
let fixture_name = "nvim_insert";
|
let fixture_name = "nvim_insert";
|
||||||
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
||||||
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
|
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &QUIT]);
|
||||||
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
||||||
let output_frames = fake_input_output
|
let output_frames = fake_input_output
|
||||||
.stdout_writer
|
.stdout_writer
|
||||||
|
|
@ -376,7 +376,7 @@ pub fn bash_cursor_linewrap() {
|
||||||
};
|
};
|
||||||
let fixture_name = "bash_cursor_linewrap";
|
let fixture_name = "bash_cursor_linewrap";
|
||||||
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
||||||
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
|
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &QUIT]);
|
||||||
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
||||||
let output_frames = fake_input_output
|
let output_frames = fake_input_output
|
||||||
.stdout_writer
|
.stdout_writer
|
||||||
|
|
@ -401,7 +401,7 @@ pub fn fish_paste_multiline() {
|
||||||
};
|
};
|
||||||
let fixture_name = "fish_paste_multiline";
|
let fixture_name = "fish_paste_multiline";
|
||||||
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
||||||
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
|
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &QUIT]);
|
||||||
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
||||||
let output_frames = fake_input_output
|
let output_frames = fake_input_output
|
||||||
.stdout_writer
|
.stdout_writer
|
||||||
|
|
@ -424,7 +424,7 @@ pub fn git_log() {
|
||||||
};
|
};
|
||||||
let fixture_name = "git_log";
|
let fixture_name = "git_log";
|
||||||
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
||||||
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
|
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &QUIT]);
|
||||||
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
||||||
let output_frames = fake_input_output
|
let output_frames = fake_input_output
|
||||||
.stdout_writer
|
.stdout_writer
|
||||||
|
|
@ -449,7 +449,7 @@ pub fn git_diff_scrollup() {
|
||||||
};
|
};
|
||||||
let fixture_name = "git_diff_scrollup";
|
let fixture_name = "git_diff_scrollup";
|
||||||
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
||||||
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
|
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &QUIT]);
|
||||||
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
||||||
let output_frames = fake_input_output
|
let output_frames = fake_input_output
|
||||||
.stdout_writer
|
.stdout_writer
|
||||||
|
|
@ -472,7 +472,7 @@ pub fn emacs_longbuf() {
|
||||||
};
|
};
|
||||||
let fixture_name = "emacs_longbuf_tutorial";
|
let fixture_name = "emacs_longbuf_tutorial";
|
||||||
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
let mut fake_input_output = get_fake_os_input(&fake_win_size, fixture_name);
|
||||||
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
|
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &QUIT]);
|
||||||
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
start(Box::new(fake_input_output.clone()), CliArgs::default());
|
||||||
let output_frames = fake_input_output
|
let output_frames = fake_input_output
|
||||||
.stdout_writer
|
.stdout_writer
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ pub fn accepts_basic_layout() {
|
||||||
y: 0,
|
y: 0,
|
||||||
};
|
};
|
||||||
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(&[&COMMAND_TOGGLE, &COMMAND_TOGGLE, &QUIT]);
|
fake_input_output.add_terminal_input(&[&COMMAND_TOGGLE, &QUIT]);
|
||||||
let mut opts = CliArgs::default();
|
let mut opts = CliArgs::default();
|
||||||
opts.layout = Some(PathBuf::from(
|
opts.layout = Some(PathBuf::from(
|
||||||
"src/tests/fixtures/layouts/three-panes-with-nesting.yaml",
|
"src/tests/fixtures/layouts/three-panes-with-nesting.yaml",
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ pub fn move_focus_down() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
|
|
@ -55,7 +54,6 @@ pub fn move_focus_down_to_the_largest_overlap() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ pub fn move_focus_left() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -54,7 +53,6 @@ pub fn move_focus_left_to_the_largest_overlap() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ pub fn move_focus_right() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -55,7 +54,6 @@ pub fn move_focus_right_to_the_largest_overlap() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ pub fn move_focus_up() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
|
|
@ -54,7 +53,6 @@ pub fn move_focus_up_to_the_largest_overlap() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
|
|
|
||||||
|
|
@ -33,13 +33,10 @@ pub fn resize_down_with_pane_above() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_DOWN_IN_RESIZE_MODE,
|
&RESIZE_DOWN_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -75,14 +72,11 @@ pub fn resize_down_with_pane_below() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_DOWN_IN_RESIZE_MODE,
|
&RESIZE_DOWN_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -121,7 +115,6 @@ pub fn resize_down_with_panes_above_and_below() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
|
|
@ -129,8 +122,6 @@ pub fn resize_down_with_panes_above_and_below() {
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_DOWN_IN_RESIZE_MODE,
|
&RESIZE_DOWN_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -167,7 +158,6 @@ pub fn resize_down_with_multiple_panes_above() {
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
|
|
@ -176,8 +166,6 @@ pub fn resize_down_with_multiple_panes_above() {
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_DOWN_IN_RESIZE_MODE,
|
&RESIZE_DOWN_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -215,7 +203,6 @@ pub fn resize_down_with_panes_above_aligned_left_with_current_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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -226,8 +213,6 @@ pub fn resize_down_with_panes_above_aligned_left_with_current_pane() {
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_DOWN_IN_RESIZE_MODE,
|
&RESIZE_DOWN_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -265,7 +250,6 @@ pub fn resize_down_with_panes_below_aligned_left_with_current_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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -275,8 +259,6 @@ pub fn resize_down_with_panes_below_aligned_left_with_current_pane() {
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_DOWN_IN_RESIZE_MODE,
|
&RESIZE_DOWN_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -314,7 +296,6 @@ pub fn resize_down_with_panes_above_aligned_right_with_current_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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -322,8 +303,6 @@ pub fn resize_down_with_panes_above_aligned_right_with_current_pane() {
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_DOWN_IN_RESIZE_MODE,
|
&RESIZE_DOWN_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -361,7 +340,6 @@ pub fn resize_down_with_panes_below_aligned_right_with_current_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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -370,8 +348,6 @@ pub fn resize_down_with_panes_below_aligned_right_with_current_pane() {
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_DOWN_IN_RESIZE_MODE,
|
&RESIZE_DOWN_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -409,7 +385,6 @@ pub fn resize_down_with_panes_above_aligned_left_and_right_with_current_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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -421,8 +396,6 @@ pub fn resize_down_with_panes_above_aligned_left_and_right_with_current_pane() {
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_DOWN_IN_RESIZE_MODE,
|
&RESIZE_DOWN_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -460,7 +433,6 @@ pub fn resize_down_with_panes_below_aligned_left_and_right_with_current_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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -474,8 +446,6 @@ pub fn resize_down_with_panes_below_aligned_left_and_right_with_current_pane() {
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_DOWN_IN_RESIZE_MODE,
|
&RESIZE_DOWN_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -513,22 +483,17 @@ pub fn resize_down_with_panes_above_aligned_left_and_right_with_panes_to_the_lef
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
|
|
@ -548,8 +513,6 @@ pub fn resize_down_with_panes_above_aligned_left_and_right_with_panes_to_the_lef
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
|
|
@ -589,22 +552,17 @@ pub fn resize_down_with_panes_below_aligned_left_and_right_with_to_the_left_and_
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
|
|
@ -626,8 +584,6 @@ pub fn resize_down_with_panes_below_aligned_left_and_right_with_to_the_left_and_
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
|
|
@ -664,13 +620,10 @@ pub fn cannot_resize_down_when_pane_below_is_at_minimum_height() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_DOWN_IN_RESIZE_MODE,
|
&RESIZE_DOWN_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
|
||||||
|
|
@ -30,13 +30,10 @@ pub fn resize_left_with_pane_to_the_left() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -70,14 +67,11 @@ pub fn resize_left_with_pane_to_the_right() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -111,7 +105,6 @@ pub fn resize_left_with_panes_to_the_left_and_right() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -119,8 +112,6 @@ pub fn resize_left_with_panes_to_the_left_and_right() {
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -155,7 +146,6 @@ pub fn resize_left_with_multiple_panes_to_the_left() {
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -164,8 +154,6 @@ pub fn resize_left_with_multiple_panes_to_the_left() {
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -201,7 +189,6 @@ pub fn resize_left_with_panes_to_the_left_aligned_top_with_current_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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -212,8 +199,6 @@ pub fn resize_left_with_panes_to_the_left_aligned_top_with_current_pane() {
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -249,7 +234,6 @@ pub fn resize_left_with_panes_to_the_right_aligned_top_with_current_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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -257,8 +241,6 @@ pub fn resize_left_with_panes_to_the_right_aligned_top_with_current_pane() {
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -294,7 +276,6 @@ pub fn resize_left_with_panes_to_the_left_aligned_bottom_with_current_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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -304,8 +285,6 @@ pub fn resize_left_with_panes_to_the_left_aligned_bottom_with_current_pane() {
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -341,7 +320,6 @@ pub fn resize_left_with_panes_to_the_right_aligned_bottom_with_current_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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -350,8 +328,6 @@ pub fn resize_left_with_panes_to_the_right_aligned_bottom_with_current_pane() {
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -389,7 +365,6 @@ pub fn resize_left_with_panes_to_the_left_aligned_top_and_bottom_with_current_pa
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
|
|
@ -401,8 +376,6 @@ pub fn resize_left_with_panes_to_the_left_aligned_top_and_bottom_with_current_pa
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -440,7 +413,6 @@ pub fn resize_left_with_panes_to_the_right_aligned_top_and_bottom_with_current_p
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
|
|
@ -454,8 +426,6 @@ pub fn resize_left_with_panes_to_the_right_aligned_top_and_bottom_with_current_p
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -493,22 +463,17 @@ pub fn resize_left_with_panes_to_the_left_aligned_top_and_bottom_with_panes_abov
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
|
|
@ -528,8 +493,6 @@ pub fn resize_left_with_panes_to_the_left_aligned_top_and_bottom_with_panes_abov
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
|
|
@ -570,22 +533,17 @@ pub fn resize_left_with_panes_to_the_right_aligned_top_and_bottom_with_panes_abo
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
|
|
@ -607,8 +565,6 @@ pub fn resize_left_with_panes_to_the_right_aligned_top_and_bottom_with_panes_abo
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
|
|
@ -645,13 +601,10 @@ pub fn cannot_resize_left_when_pane_to_the_left_is_at_minimum_width() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
|
||||||
|
|
@ -31,13 +31,10 @@ pub fn resize_right_with_pane_to_the_left() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_RIGHT_IN_RESIZE_MODE,
|
&RESIZE_RIGHT_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -71,14 +68,11 @@ pub fn resize_right_with_pane_to_the_right() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_RIGHT_IN_RESIZE_MODE,
|
&RESIZE_RIGHT_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -112,7 +106,6 @@ pub fn resize_right_with_panes_to_the_left_and_right() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -120,8 +113,6 @@ pub fn resize_right_with_panes_to_the_left_and_right() {
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_RIGHT_IN_RESIZE_MODE,
|
&RESIZE_RIGHT_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -156,7 +147,6 @@ pub fn resize_right_with_multiple_panes_to_the_left() {
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -165,8 +155,6 @@ pub fn resize_right_with_multiple_panes_to_the_left() {
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_RIGHT_IN_RESIZE_MODE,
|
&RESIZE_RIGHT_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -202,7 +190,6 @@ pub fn resize_right_with_panes_to_the_left_aligned_top_with_current_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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -213,8 +200,6 @@ pub fn resize_right_with_panes_to_the_left_aligned_top_with_current_pane() {
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_RIGHT_IN_RESIZE_MODE,
|
&RESIZE_RIGHT_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -250,7 +235,6 @@ pub fn resize_right_with_panes_to_the_right_aligned_top_with_current_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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -258,8 +242,6 @@ pub fn resize_right_with_panes_to_the_right_aligned_top_with_current_pane() {
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_RIGHT_IN_RESIZE_MODE,
|
&RESIZE_RIGHT_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -295,7 +277,6 @@ pub fn resize_right_with_panes_to_the_left_aligned_bottom_with_current_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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -305,8 +286,6 @@ pub fn resize_right_with_panes_to_the_left_aligned_bottom_with_current_pane() {
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_RIGHT_IN_RESIZE_MODE,
|
&RESIZE_RIGHT_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -342,7 +321,6 @@ pub fn resize_right_with_panes_to_the_right_aligned_bottom_with_current_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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -351,8 +329,6 @@ pub fn resize_right_with_panes_to_the_right_aligned_bottom_with_current_pane() {
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_RIGHT_IN_RESIZE_MODE,
|
&RESIZE_RIGHT_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -390,7 +366,6 @@ pub fn resize_right_with_panes_to_the_left_aligned_top_and_bottom_with_current_p
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
|
|
@ -402,8 +377,6 @@ pub fn resize_right_with_panes_to_the_left_aligned_top_and_bottom_with_current_p
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_RIGHT_IN_RESIZE_MODE,
|
&RESIZE_RIGHT_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -441,7 +414,6 @@ pub fn resize_right_with_panes_to_the_right_aligned_top_and_bottom_with_current_
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
|
|
@ -455,8 +427,6 @@ pub fn resize_right_with_panes_to_the_right_aligned_top_and_bottom_with_current_
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_RIGHT_IN_RESIZE_MODE,
|
&RESIZE_RIGHT_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -494,22 +464,17 @@ pub fn resize_right_with_panes_to_the_left_aligned_top_and_bottom_with_panes_abo
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
|
|
@ -529,8 +494,6 @@ pub fn resize_right_with_panes_to_the_left_aligned_top_and_bottom_with_panes_abo
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
|
|
@ -570,22 +533,17 @@ pub fn resize_right_with_panes_to_the_right_aligned_top_and_bottom_with_panes_ab
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
|
|
@ -607,8 +565,6 @@ pub fn resize_right_with_panes_to_the_right_aligned_top_and_bottom_with_panes_ab
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
|
|
@ -645,13 +601,10 @@ pub fn cannot_resize_right_when_pane_to_the_left_is_at_minimum_width() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_RIGHT_IN_RESIZE_MODE,
|
&RESIZE_RIGHT_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
|
||||||
|
|
@ -32,13 +32,10 @@ pub fn resize_up_with_pane_above() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -74,14 +71,11 @@ pub fn resize_up_with_pane_below() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -120,7 +114,6 @@ pub fn resize_up_with_panes_above_and_below() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
|
|
@ -128,8 +121,6 @@ pub fn resize_up_with_panes_above_and_below() {
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -165,7 +156,6 @@ pub fn resize_up_with_multiple_panes_above() {
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
|
|
@ -174,8 +164,6 @@ pub fn resize_up_with_multiple_panes_above() {
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -211,7 +199,6 @@ pub fn resize_up_with_panes_above_aligned_left_with_current_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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -222,8 +209,6 @@ pub fn resize_up_with_panes_above_aligned_left_with_current_pane() {
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -261,7 +246,6 @@ pub fn resize_up_with_panes_below_aligned_left_with_current_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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -271,8 +255,6 @@ pub fn resize_up_with_panes_below_aligned_left_with_current_pane() {
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -310,7 +292,6 @@ pub fn resize_up_with_panes_above_aligned_right_with_current_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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -318,8 +299,6 @@ pub fn resize_up_with_panes_above_aligned_right_with_current_pane() {
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -357,7 +336,6 @@ pub fn resize_up_with_panes_below_aligned_right_with_current_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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -366,8 +344,6 @@ pub fn resize_up_with_panes_below_aligned_right_with_current_pane() {
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -405,7 +381,6 @@ pub fn resize_up_with_panes_above_aligned_left_and_right_with_current_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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -417,8 +392,6 @@ pub fn resize_up_with_panes_above_aligned_left_and_right_with_current_pane() {
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -456,7 +429,6 @@ pub fn resize_up_with_panes_below_aligned_left_and_right_with_current_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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -470,8 +442,6 @@ pub fn resize_up_with_panes_below_aligned_left_and_right_with_current_pane() {
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -509,22 +479,17 @@ pub fn resize_up_with_panes_above_aligned_left_and_right_with_panes_to_the_left_
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
|
|
@ -544,8 +509,6 @@ pub fn resize_up_with_panes_above_aligned_left_and_right_with_panes_to_the_left_
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
|
|
@ -585,22 +548,17 @@ pub fn resize_up_with_panes_below_aligned_left_and_right_with_to_the_left_and_ri
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
|
|
@ -622,8 +580,6 @@ pub fn resize_up_with_panes_below_aligned_left_and_right_with_to_the_left_and_ri
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&MOVE_FOCUS_IN_PANE_MODE,
|
&MOVE_FOCUS_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
&RESIZE_LEFT_IN_RESIZE_MODE,
|
&RESIZE_LEFT_IN_RESIZE_MODE,
|
||||||
|
|
@ -660,13 +616,10 @@ pub fn cannot_resize_up_when_pane_above_is_at_minimum_height() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&RESIZE_MODE,
|
&RESIZE_MODE,
|
||||||
&RESIZE_UP_IN_RESIZE_MODE,
|
&RESIZE_UP_IN_RESIZE_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
|
||||||
|
|
@ -25,13 +25,10 @@ pub fn open_new_tab() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&TAB_MODE,
|
&TAB_MODE,
|
||||||
&NEW_TAB_IN_TAB_MODE,
|
&NEW_TAB_IN_TAB_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -59,13 +56,10 @@ pub fn switch_to_prev_tab() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&TAB_MODE,
|
&TAB_MODE,
|
||||||
&NEW_TAB_IN_TAB_MODE,
|
&NEW_TAB_IN_TAB_MODE,
|
||||||
&SWITCH_PREV_TAB_IN_TAB_MODE,
|
&SWITCH_PREV_TAB_IN_TAB_MODE,
|
||||||
|
|
@ -94,13 +88,10 @@ pub fn switch_to_next_tab() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&TAB_MODE,
|
&TAB_MODE,
|
||||||
&NEW_TAB_IN_TAB_MODE,
|
&NEW_TAB_IN_TAB_MODE,
|
||||||
&SWITCH_NEXT_TAB_IN_TAB_MODE,
|
&SWITCH_NEXT_TAB_IN_TAB_MODE,
|
||||||
|
|
@ -129,13 +120,10 @@ pub fn close_tab() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&TAB_MODE,
|
&TAB_MODE,
|
||||||
&NEW_TAB_IN_TAB_MODE,
|
&NEW_TAB_IN_TAB_MODE,
|
||||||
&CLOSE_TAB_IN_TAB_MODE,
|
&CLOSE_TAB_IN_TAB_MODE,
|
||||||
|
|
@ -164,13 +152,10 @@ pub fn close_last_pane_in_a_tab() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&TAB_MODE,
|
&TAB_MODE,
|
||||||
&NEW_TAB_IN_TAB_MODE,
|
&NEW_TAB_IN_TAB_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&CLOSE_PANE_IN_PANE_MODE,
|
&CLOSE_PANE_IN_PANE_MODE,
|
||||||
|
|
@ -200,18 +185,13 @@ pub fn close_the_middle_tab() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&TAB_MODE,
|
&TAB_MODE,
|
||||||
&NEW_TAB_IN_TAB_MODE,
|
&NEW_TAB_IN_TAB_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&TAB_MODE,
|
&TAB_MODE,
|
||||||
&NEW_TAB_IN_TAB_MODE,
|
&NEW_TAB_IN_TAB_MODE,
|
||||||
&SWITCH_PREV_TAB_IN_TAB_MODE,
|
&SWITCH_PREV_TAB_IN_TAB_MODE,
|
||||||
|
|
@ -241,34 +221,23 @@ pub fn close_the_tab_that_has_a_pane_in_fullscreen() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&TAB_MODE,
|
&TAB_MODE,
|
||||||
&NEW_TAB_IN_TAB_MODE,
|
&NEW_TAB_IN_TAB_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&TAB_MODE,
|
&TAB_MODE,
|
||||||
&NEW_TAB_IN_TAB_MODE,
|
&NEW_TAB_IN_TAB_MODE,
|
||||||
&SWITCH_PREV_TAB_IN_TAB_MODE,
|
&SWITCH_PREV_TAB_IN_TAB_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&TOGGLE_ACTIVE_TERMINAL_FULLSCREEN_IN_PANE_MODE,
|
&TOGGLE_ACTIVE_TERMINAL_FULLSCREEN_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&TAB_MODE,
|
&TAB_MODE,
|
||||||
&CLOSE_TAB_IN_TAB_MODE,
|
&CLOSE_TAB_IN_TAB_MODE,
|
||||||
&QUIT,
|
&QUIT,
|
||||||
|
|
@ -296,13 +265,10 @@ pub fn closing_last_tab_exits_the_app() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_DOWN_IN_PANE_MODE,
|
&SPLIT_DOWN_IN_PANE_MODE,
|
||||||
&ESC,
|
&ESC,
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&TAB_MODE,
|
&TAB_MODE,
|
||||||
&NEW_TAB_IN_TAB_MODE,
|
&NEW_TAB_IN_TAB_MODE,
|
||||||
&CLOSE_TAB_IN_TAB_MODE,
|
&CLOSE_TAB_IN_TAB_MODE,
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ pub fn adding_new_terminal_in_fullscreen() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
@ -55,7 +54,6 @@ pub fn move_focus_is_disabled_in_fullscreen() {
|
||||||
};
|
};
|
||||||
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(&[
|
fake_input_output.add_terminal_input(&[
|
||||||
&COMMAND_TOGGLE,
|
|
||||||
&COMMAND_TOGGLE,
|
&COMMAND_TOGGLE,
|
||||||
&PANE_MODE,
|
&PANE_MODE,
|
||||||
&SPLIT_RIGHT_IN_PANE_MODE,
|
&SPLIT_RIGHT_IN_PANE_MODE,
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ pub enum Key {
|
||||||
#[derive(Default, Debug, Clone, Serialize, Deserialize)]
|
#[derive(Default, Debug, Clone, Serialize, Deserialize)]
|
||||||
pub struct Help {
|
pub struct Help {
|
||||||
pub mode: InputMode,
|
pub mode: InputMode,
|
||||||
pub mode_is_persistent: bool,
|
|
||||||
pub keybinds: Vec<(String, String)>,
|
pub keybinds: Vec<(String, String)>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -36,7 +35,6 @@ pub struct Help {
|
||||||
pub enum InputMode {
|
pub enum InputMode {
|
||||||
Normal,
|
Normal,
|
||||||
Command,
|
Command,
|
||||||
CommandPersistent,
|
|
||||||
Resize,
|
Resize,
|
||||||
Pane,
|
Pane,
|
||||||
Tab,
|
Tab,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue