From 776a2c5151f768bfa40fda7471258527c106dd85 Mon Sep 17 00:00:00 2001 From: a-kenji Date: Wed, 12 May 2021 13:32:39 +0200 Subject: [PATCH] Fix Simplified Ui Propagate the config now, in all the places, as opposed to fallback to a default. --- CHANGELOG.md | 1 + src/client/mod.rs | 5 ++-- src/common/input/handler.rs | 7 +++-- src/common/input/options.rs | 22 ++------------ src/common/screen.rs | 4 +-- src/main.rs | 15 ++++++++-- src/server/mod.rs | 30 +++++++++++++++---- src/server/route.rs | 25 ++++++++++++---- src/tests/integration/basic.rs | 15 +++++++++- src/tests/integration/close_pane.rs | 15 +++++++++- src/tests/integration/compatibility.rs | 22 +++++++++++++- src/tests/integration/layouts.rs | 3 +- src/tests/integration/move_focus_down.rs | 4 ++- src/tests/integration/move_focus_left.rs | 5 +++- src/tests/integration/move_focus_right.rs | 5 +++- src/tests/integration/move_focus_up.rs | 4 ++- src/tests/integration/resize_down.rs | 15 +++++++++- src/tests/integration/resize_left.rs | 15 +++++++++- src/tests/integration/resize_right.rs | 15 +++++++++- src/tests/integration/resize_up.rs | 15 +++++++++- src/tests/integration/tabs.rs | 10 ++++++- .../integration/terminal_window_resize.rs | 6 +++- src/tests/integration/toggle_fullscreen.rs | 4 ++- zellij-tile/src/data.rs | 8 ++++- 24 files changed, 213 insertions(+), 57 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c31aaeb1..9cf212d08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) * Add support for requesting a simpler layout from plugins, move `clean` flag from `options` to `setup` (https://github.com/zellij-org/zellij/pull/479) * Improve config loading slightly (https://github.com/zellij-org/zellij/pull/492) * Terminal compatibility: preserve current style when clearing viewport (https://github.com/zellij-org/zellij/pull/493) +* Fix propagation of plugin ui request (https://github.com/zellij-org/zellij/pull/495) ## [0.9.0] - 2021-05-11 * Add more functionality to unbinding the default keybindings (https://github.com/zellij-org/zellij/pull/468) diff --git a/src/client/mod.rs b/src/client/mod.rs index 5fb40096a..3dfb24aad 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -15,7 +15,7 @@ use crate::common::{ errors::{ClientContext, ContextType}, input::config::Config, input::handler::input_loop, - input::options::{ConfigOptions, Options}, + input::options::Options, os_input_output::ClientOsApi, thread_bus::{SenderType, SenderWithContext, SyncChannelWithContext}, }; @@ -46,8 +46,7 @@ pub fn start_client(mut os_input: Box, opts: CliArgs, config: C let mut command_is_executing = CommandIsExecuting::new(); - let config_options: ConfigOptions = - Options::from_cli(&config.options, opts.option.clone()).into(); + let config_options = Options::from_cli(&config.options, opts.option.clone()); let full_screen_ws = os_input.get_terminal_size_using_fd(0); os_input.connect_to_server(); diff --git a/src/common/input/handler.rs b/src/common/input/handler.rs index 68a75448d..b3bbbd0c1 100644 --- a/src/common/input/handler.rs +++ b/src/common/input/handler.rs @@ -147,9 +147,12 @@ impl InputHandler { /// Creates a [`Help`] struct indicating the current [`InputMode`] and its keybinds /// (as pairs of [`String`]s). // TODO this should probably be automatically generated in some way -pub fn get_mode_info(mode: InputMode, palette: Palette) -> ModeInfo { +pub fn get_mode_info( + mode: InputMode, + palette: Palette, + capabilities: PluginCapabilities, +) -> ModeInfo { let mut keybinds: Vec<(String, String)> = vec![]; - let capabilities = PluginCapabilities { arrow_fonts: true }; match mode { InputMode::Normal | InputMode::Locked => {} InputMode::Resize => { diff --git a/src/common/input/options.rs b/src/common/input/options.rs index 3bd3fc31b..33625b654 100644 --- a/src/common/input/options.rs +++ b/src/common/input/options.rs @@ -6,18 +6,10 @@ use structopt::StructOpt; #[derive(Clone, Default, Debug, PartialEq, Deserialize, Serialize, StructOpt)] /// Options that can be set either through the config file, /// or cli flags -/// intermediate struct pub struct Options { /// Allow plugins to use a more simplified layout /// that is compatible with more fonts #[structopt(long)] - pub simplified_ui: Option, -} - -#[derive(Clone, Default, Debug, PartialEq, Deserialize, Serialize)] -/// Merged version of the [`Options`] struct -// TODO: Maybe a good candidate for a macro? -pub struct ConfigOptions { pub simplified_ui: bool, } @@ -34,8 +26,8 @@ impl Options { /// will supercede a `Some` in `self` // TODO: Maybe a good candidate for a macro? pub fn merge(&self, other: Options) -> Options { - let simplified_ui = if let Some(bool) = other.simplified_ui { - Some(bool) + let simplified_ui = if other.simplified_ui { + true } else { self.simplified_ui }; @@ -51,13 +43,3 @@ impl Options { } } } - -impl From for ConfigOptions { - fn from(options: Options) -> ConfigOptions { - let simplified_ui = options.simplified_ui; - - ConfigOptions { - simplified_ui: simplified_ui.unwrap_or_default(), - } - } -} diff --git a/src/common/screen.rs b/src/common/screen.rs index 804730d07..bc99f9532 100644 --- a/src/common/screen.rs +++ b/src/common/screen.rs @@ -4,7 +4,7 @@ use std::collections::BTreeMap; use std::os::unix::io::RawFd; use std::str; -use crate::common::input::options::ConfigOptions; +use crate::common::input::options::Options; use crate::common::pty::{PtyInstruction, VteBytes}; use crate::common::thread_bus::Bus; use crate::errors::{ContextType, ScreenContext}; @@ -329,7 +329,7 @@ pub fn screen_thread_main( bus: Bus, max_panes: Option, full_screen_ws: PositionAndSize, - config_options: ConfigOptions, + config_options: Options, ) { let colors = bus.os_input.as_ref().unwrap().load_palette(); let capabilities = config_options.simplified_ui; diff --git a/src/main.rs b/src/main.rs index ffc2373e1..cb016067f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,7 +12,7 @@ use structopt::StructOpt; use crate::cli::CliArgs; use crate::command_is_executing::CommandIsExecuting; -use crate::common::input::config::Config; +use crate::common::input::{config::Config, options::Options}; use crate::os_input_output::{get_client_os_input, get_server_os_input, ClientOsApi, ServerOsApi}; use crate::utils::{ consts::{ZELLIJ_TMP_DIR, ZELLIJ_TMP_LOG_DIR}, @@ -29,6 +29,8 @@ pub fn main() { std::process::exit(1); } }; + let config_options = Options::from_cli(&config.options, opts.option.clone()); + if let Some(crate::cli::ConfigCli::GenerateCompletion { shell }) = opts.option { let shell = match shell.as_ref() { "bash" => structopt::clap::Shell::Bash, @@ -51,7 +53,13 @@ pub fn main() { atomic_create_dir(&*ZELLIJ_TMP_LOG_DIR).unwrap(); let server_os_input = get_server_os_input(); let os_input = get_client_os_input(); - start(Box::new(os_input), opts, Box::new(server_os_input), config); + start( + Box::new(os_input), + opts, + Box::new(server_os_input), + config, + config_options, + ); } } pub fn start( @@ -59,8 +67,9 @@ pub fn start( opts: CliArgs, server_os_input: Box, config: Config, + config_options: Options, ) { - let ipc_thread = start_server(server_os_input); + let ipc_thread = start_server(server_os_input, config_options); start_client(client_os_input, opts, config); drop(ipc_thread.join()); } diff --git a/src/server/mod.rs b/src/server/mod.rs index 4ef30ce29..622a32576 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -6,13 +6,14 @@ use std::sync::{Arc, RwLock}; use std::thread; use std::{path::PathBuf, sync::mpsc::channel}; use wasmer::Store; +use zellij_tile::data::PluginCapabilities; use crate::cli::CliArgs; use crate::client::ClientInstruction; use crate::common::thread_bus::{Bus, ThreadSenders}; use crate::common::{ errors::{ContextType, ServerContext}, - input::{actions::Action, options::ConfigOptions}, + input::{actions::Action, options::Options}, os_input_output::{set_permissions, ServerOsApi}, pty::{pty_thread_main, Pty, PtyInstruction}, screen::{screen_thread_main, ScreenInstruction}, @@ -30,7 +31,7 @@ use route::route_thread_main; #[derive(Serialize, Deserialize, Debug, Clone)] pub enum ServerInstruction { TerminalResize(PositionAndSize), - NewClient(PositionAndSize, CliArgs, ConfigOptions), + NewClient(PositionAndSize, CliArgs, Options), Action(Action), Render(Option), UnblockInputThread, @@ -55,7 +56,10 @@ impl Drop for SessionMetaData { } } -pub fn start_server(os_input: Box) -> thread::JoinHandle<()> { +pub fn start_server( + os_input: Box, + config_options: Options, +) -> thread::JoinHandle<()> { let (to_server, server_receiver): ChannelWithContext = channel(); let to_server = SenderWithContext::new(SenderType::Sender(to_server)); let sessions: Arc>> = Arc::new(RwLock::new(None)); @@ -67,8 +71,11 @@ pub fn start_server(os_input: Box) -> thread::JoinHandle<()> { let sessions = sessions.clone(); let os_input = os_input.clone(); let to_server = to_server.clone(); + let capabilities = PluginCapabilities { + arrow_fonts: !config_options.simplified_ui, + }; - move || route_thread_main(sessions, os_input, to_server) + move || route_thread_main(sessions, os_input, to_server, capabilities) }) .unwrap(); #[cfg(not(test))] @@ -78,6 +85,9 @@ pub fn start_server(os_input: Box) -> thread::JoinHandle<()> { let os_input = os_input.clone(); let sessions = sessions.clone(); let to_server = to_server.clone(); + let capabilities = PluginCapabilities { + arrow_fonts: config_options.simplified_ui, + }; move || { drop(std::fs::remove_file(&*ZELLIJ_IPC_PIPE)); let listener = LocalSocketListener::bind(&**ZELLIJ_IPC_PIPE).unwrap(); @@ -96,7 +106,14 @@ pub fn start_server(os_input: Box) -> thread::JoinHandle<()> { let os_input = os_input.clone(); let to_server = to_server.clone(); - move || route_thread_main(sessions, os_input, to_server) + move || { + route_thread_main( + sessions, + os_input, + to_server, + capabilities, + ) + } }) .unwrap(); } @@ -155,7 +172,7 @@ pub fn start_server(os_input: Box) -> thread::JoinHandle<()> { fn init_session( os_input: Box, opts: CliArgs, - config_options: ConfigOptions, + config_options: Options, to_server: SenderWithContext, full_screen_ws: PositionAndSize, ) -> SessionMetaData { @@ -214,6 +231,7 @@ fn init_session( Some(os_input.clone()), ); let max_panes = opts.max_panes; + let config_options = config_options; move || { screen_thread_main(screen_bus, max_panes, full_screen_ws, config_options); diff --git a/src/server/route.rs b/src/server/route.rs index 668cdfbd0..bd4b1b608 100644 --- a/src/server/route.rs +++ b/src/server/route.rs @@ -1,6 +1,6 @@ use std::sync::{Arc, RwLock}; -use zellij_tile::data::Event; +use zellij_tile::data::{Event, PluginCapabilities}; use crate::common::errors::{ContextType, ServerContext}; use crate::common::input::actions::{Action, Direction}; @@ -12,7 +12,12 @@ use crate::common::thread_bus::SenderWithContext; use crate::common::wasm_vm::PluginInstruction; use crate::server::{ServerInstruction, SessionMetaData}; -fn route_action(action: Action, session: &SessionMetaData, os_input: &dyn ServerOsApi) { +fn route_action( + action: Action, + session: &SessionMetaData, + os_input: &dyn ServerOsApi, + capabilities: PluginCapabilities, +) { match action { Action::Write(val) => { session @@ -30,12 +35,16 @@ fn route_action(action: Action, session: &SessionMetaData, os_input: &dyn Server .senders .send_to_plugin(PluginInstruction::Update( None, - Event::ModeUpdate(get_mode_info(mode, palette)), + Event::ModeUpdate(get_mode_info(mode, palette, capabilities)), )) .unwrap(); session .senders - .send_to_screen(ScreenInstruction::ChangeMode(get_mode_info(mode, palette))) + .send_to_screen(ScreenInstruction::ChangeMode(get_mode_info( + mode, + palette, + capabilities, + ))) .unwrap(); session .senders @@ -181,6 +190,7 @@ pub fn route_thread_main( sessions: Arc>>, mut os_input: Box, to_server: SenderWithContext, + capabilities: PluginCapabilities, ) { loop { let (instruction, mut err_ctx) = os_input.recv_from_client(); @@ -192,7 +202,12 @@ pub fn route_thread_main( break; } ServerInstruction::Action(action) => { - route_action(action, rlocked_sessions.as_ref().unwrap(), &*os_input); + route_action( + action, + rlocked_sessions.as_ref().unwrap(), + &*os_input, + capabilities, + ); } ServerInstruction::TerminalResize(new_size) => { rlocked_sessions diff --git a/src/tests/integration/basic.rs b/src/tests/integration/basic.rs index c8305cabd..4d2c4878b 100644 --- a/src/tests/integration/basic.rs +++ b/src/tests/integration/basic.rs @@ -1,7 +1,7 @@ use crate::panes::PositionAndSize; use ::insta::assert_snapshot; -use crate::common::input::config::Config; +use crate::common::input::{config::Config, options::Options}; use crate::tests::fakes::FakeInputOutput; use crate::tests::utils::commands::{ PANE_MODE, QUIT, SCROLL_DOWN_IN_SCROLL_MODE, SCROLL_MODE, SCROLL_PAGE_DOWN_IN_SCROLL_MODE, @@ -32,6 +32,7 @@ pub fn starts_with_one_terminal() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -60,6 +61,7 @@ pub fn split_terminals_vertically() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -88,6 +90,7 @@ pub fn split_terminals_horizontally() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -123,6 +126,7 @@ pub fn split_largest_terminal() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -151,6 +155,7 @@ pub fn cannot_split_terminals_vertically_when_active_terminal_is_too_small() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -179,6 +184,7 @@ pub fn cannot_split_terminals_horizontally_when_active_terminal_is_too_small() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -207,6 +213,7 @@ pub fn cannot_split_largest_terminal_when_there_is_no_room() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -243,6 +250,7 @@ pub fn scrolling_up_inside_a_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -281,6 +289,7 @@ pub fn scrolling_down_inside_a_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -316,6 +325,7 @@ pub fn scrolling_page_up_inside_a_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -354,6 +364,7 @@ pub fn scrolling_page_down_inside_a_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -393,6 +404,7 @@ pub fn max_panes() { opts, Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -430,6 +442,7 @@ pub fn toggle_focused_pane_fullscreen() { opts, Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer diff --git a/src/tests/integration/close_pane.rs b/src/tests/integration/close_pane.rs index 869debed1..d151f63d3 100644 --- a/src/tests/integration/close_pane.rs +++ b/src/tests/integration/close_pane.rs @@ -5,7 +5,7 @@ use crate::tests::fakes::FakeInputOutput; use crate::tests::utils::{get_next_to_last_snapshot, get_output_frame_snapshots}; use crate::{start, CliArgs}; -use crate::common::input::config::Config; +use crate::common::input::{config::Config, options::Options}; use crate::tests::utils::commands::{ CLOSE_PANE_IN_PANE_MODE, ESC, MOVE_FOCUS_IN_PANE_MODE, PANE_MODE, QUIT, RESIZE_DOWN_IN_RESIZE_MODE, RESIZE_LEFT_IN_RESIZE_MODE, RESIZE_MODE, RESIZE_UP_IN_RESIZE_MODE, @@ -45,6 +45,7 @@ pub fn close_pane_with_another_pane_above_it() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -88,6 +89,7 @@ pub fn close_pane_with_another_pane_below_it() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -128,6 +130,7 @@ pub fn close_pane_with_another_pane_to_the_left() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -169,6 +172,7 @@ pub fn close_pane_with_another_pane_to_the_right() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -215,6 +219,7 @@ pub fn close_pane_with_multiple_panes_above_it() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -259,6 +264,7 @@ pub fn close_pane_with_multiple_panes_below_it() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -305,6 +311,7 @@ pub fn close_pane_with_multiple_panes_to_the_left() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -349,6 +356,7 @@ pub fn close_pane_with_multiple_panes_to_the_right() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -415,6 +423,7 @@ pub fn close_pane_with_multiple_panes_above_it_away_from_screen_edges() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -477,6 +486,7 @@ pub fn close_pane_with_multiple_panes_below_it_away_from_screen_edges() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -541,6 +551,7 @@ pub fn close_pane_with_multiple_panes_to_the_left_away_from_screen_edges() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -605,6 +616,7 @@ pub fn close_pane_with_multiple_panes_to_the_right_away_from_screen_edges() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -642,6 +654,7 @@ pub fn closing_last_pane_exits_app() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output diff --git a/src/tests/integration/compatibility.rs b/src/tests/integration/compatibility.rs index 77d3b67ea..b986b1ded 100644 --- a/src/tests/integration/compatibility.rs +++ b/src/tests/integration/compatibility.rs @@ -7,7 +7,7 @@ use crate::tests::possible_tty_inputs::Bytes; use crate::tests::utils::{get_next_to_last_snapshot, get_output_frame_snapshots}; use crate::{start, CliArgs}; -use crate::common::input::config::Config; +use crate::common::input::{config::Config, options::Options}; use crate::tests::utils::commands::QUIT; /* @@ -48,6 +48,7 @@ pub fn run_bandwhich_from_fish_shell() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -77,6 +78,7 @@ pub fn fish_tab_completion_options() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -111,6 +113,7 @@ pub fn fish_select_tab_completion_options() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -149,6 +152,7 @@ pub fn vim_scroll_region_down() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -184,6 +188,7 @@ pub fn vim_ctrl_d() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -218,6 +223,7 @@ pub fn vim_ctrl_u() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -247,6 +253,7 @@ pub fn htop() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -276,6 +283,7 @@ pub fn htop_scrolling() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -305,6 +313,7 @@ pub fn htop_right_scrolling() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -342,6 +351,7 @@ pub fn vim_overwrite() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -374,6 +384,7 @@ pub fn clear_scroll_region() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -403,6 +414,7 @@ pub fn display_tab_characters_properly() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -432,6 +444,7 @@ pub fn neovim_insert_mode() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -463,6 +476,7 @@ pub fn bash_cursor_linewrap() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -494,6 +508,7 @@ pub fn fish_paste_multiline() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -523,6 +538,7 @@ pub fn git_log() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -554,6 +570,7 @@ pub fn git_diff_scrollup() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -583,6 +600,7 @@ pub fn emacs_longbuf() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -612,6 +630,7 @@ pub fn top_and_quit() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -647,6 +666,7 @@ pub fn exa_plus_omf_theme() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer diff --git a/src/tests/integration/layouts.rs b/src/tests/integration/layouts.rs index a07995f6b..bd7ceb3fc 100644 --- a/src/tests/integration/layouts.rs +++ b/src/tests/integration/layouts.rs @@ -1,7 +1,7 @@ use insta::assert_snapshot; use std::path::PathBuf; -use crate::common::input::config::Config; +use crate::common::input::{config::Config, options::Options}; use crate::panes::PositionAndSize; use crate::tests::fakes::FakeInputOutput; use crate::tests::utils::commands::QUIT; @@ -33,6 +33,7 @@ pub fn accepts_basic_layout() { opts, Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer diff --git a/src/tests/integration/move_focus_down.rs b/src/tests/integration/move_focus_down.rs index 8ea953c6b..e182acf9b 100644 --- a/src/tests/integration/move_focus_down.rs +++ b/src/tests/integration/move_focus_down.rs @@ -5,7 +5,7 @@ use crate::tests::fakes::FakeInputOutput; use crate::tests::utils::{get_next_to_last_snapshot, get_output_frame_snapshots}; use crate::{start, CliArgs}; -use crate::common::input::config::Config; +use crate::common::input::{config::Config, options::Options}; use crate::tests::utils::commands::{ MOVE_FOCUS_DOWN_IN_PANE_MODE, MOVE_FOCUS_UP_IN_PANE_MODE, PANE_MODE, QUIT, SPLIT_DOWN_IN_PANE_MODE, SPLIT_RIGHT_IN_PANE_MODE, @@ -37,6 +37,7 @@ pub fn move_focus_down() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -74,6 +75,7 @@ pub fn move_focus_down_to_the_most_recently_used_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output diff --git a/src/tests/integration/move_focus_left.rs b/src/tests/integration/move_focus_left.rs index 5b6e05041..c991d1e8f 100644 --- a/src/tests/integration/move_focus_left.rs +++ b/src/tests/integration/move_focus_left.rs @@ -5,7 +5,7 @@ use crate::tests::fakes::FakeInputOutput; use crate::tests::utils::{get_next_to_last_snapshot, get_output_frame_snapshots}; use crate::{start, CliArgs}; -use crate::common::input::config::Config; +use crate::common::input::{config::Config, options::Options}; use crate::tests::utils::commands::{ ENTER, MOVE_FOCUS_LEFT_IN_NORMAL_MODE, MOVE_FOCUS_LEFT_IN_PANE_MODE, MOVE_FOCUS_RIGHT_IN_PANE_MODE, NEW_TAB_IN_TAB_MODE, PANE_MODE, QUIT, SPLIT_DOWN_IN_PANE_MODE, @@ -37,6 +37,7 @@ pub fn move_focus_left() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -75,6 +76,7 @@ pub fn move_focus_left_to_the_most_recently_used_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -113,6 +115,7 @@ pub fn move_focus_left_changes_tab() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output diff --git a/src/tests/integration/move_focus_right.rs b/src/tests/integration/move_focus_right.rs index e5d5ef3e8..ffc8cacfe 100644 --- a/src/tests/integration/move_focus_right.rs +++ b/src/tests/integration/move_focus_right.rs @@ -5,7 +5,7 @@ use crate::tests::fakes::FakeInputOutput; use crate::tests::utils::{get_next_to_last_snapshot, get_output_frame_snapshots}; use crate::{start, CliArgs}; -use crate::common::input::config::Config; +use crate::common::input::{config::Config, options::Options}; use crate::tests::utils::commands::{ ENTER, MOVE_FOCUS_LEFT_IN_PANE_MODE, MOVE_FOCUS_RIGHT_IN_NORMAL_MODE, MOVE_FOCUS_RIGHT_IN_PANE_MODE, NEW_TAB_IN_TAB_MODE, PANE_MODE, QUIT, SPLIT_DOWN_IN_PANE_MODE, @@ -38,6 +38,7 @@ pub fn move_focus_right() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -75,6 +76,7 @@ pub fn move_focus_right_to_the_most_recently_used_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -113,6 +115,7 @@ pub fn move_focus_right_changes_tab() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output diff --git a/src/tests/integration/move_focus_up.rs b/src/tests/integration/move_focus_up.rs index 62b64ed16..54bfef5e3 100644 --- a/src/tests/integration/move_focus_up.rs +++ b/src/tests/integration/move_focus_up.rs @@ -5,7 +5,7 @@ use crate::tests::fakes::FakeInputOutput; use crate::tests::utils::{get_next_to_last_snapshot, get_output_frame_snapshots}; use crate::{start, CliArgs}; -use crate::common::input::config::Config; +use crate::common::input::{config::Config, options::Options}; use crate::tests::utils::commands::{ MOVE_FOCUS_DOWN_IN_PANE_MODE, MOVE_FOCUS_UP_IN_PANE_MODE, PANE_MODE, QUIT, SPLIT_DOWN_IN_PANE_MODE, SPLIT_RIGHT_IN_PANE_MODE, @@ -36,6 +36,7 @@ pub fn move_focus_up() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -74,6 +75,7 @@ pub fn move_focus_up_to_the_most_recently_used_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output diff --git a/src/tests/integration/resize_down.rs b/src/tests/integration/resize_down.rs index 58104fe1f..0e710b4e5 100644 --- a/src/tests/integration/resize_down.rs +++ b/src/tests/integration/resize_down.rs @@ -5,7 +5,7 @@ use crate::tests::fakes::FakeInputOutput; use crate::tests::utils::{get_next_to_last_snapshot, get_output_frame_snapshots}; use crate::{start, CliArgs}; -use crate::common::input::config::Config; +use crate::common::input::{config::Config, options::Options}; use crate::tests::utils::commands::{ MOVE_FOCUS_IN_PANE_MODE, PANE_MODE, QUIT, RESIZE_DOWN_IN_RESIZE_MODE, RESIZE_LEFT_IN_RESIZE_MODE, RESIZE_MODE, SLEEP, SPLIT_DOWN_IN_PANE_MODE, @@ -48,6 +48,7 @@ pub fn resize_down_with_pane_above() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -93,6 +94,7 @@ pub fn resize_down_with_pane_below() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -144,6 +146,7 @@ pub fn resize_down_with_panes_above_and_below() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -194,6 +197,7 @@ pub fn resize_down_with_multiple_panes_above() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -246,6 +250,7 @@ pub fn resize_down_with_panes_above_aligned_left_with_current_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -297,6 +302,7 @@ pub fn resize_down_with_panes_below_aligned_left_with_current_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -346,6 +352,7 @@ pub fn resize_down_with_panes_above_aligned_right_with_current_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -396,6 +403,7 @@ pub fn resize_down_with_panes_below_aligned_right_with_current_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -449,6 +457,7 @@ pub fn resize_down_with_panes_above_aligned_left_and_right_with_current_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -504,6 +513,7 @@ pub fn resize_down_with_panes_below_aligned_left_and_right_with_current_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -576,6 +586,7 @@ pub fn resize_down_with_panes_above_aligned_left_and_right_with_panes_to_the_lef CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -650,6 +661,7 @@ pub fn resize_down_with_panes_below_aligned_left_and_right_with_to_the_left_and_ CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -692,6 +704,7 @@ pub fn cannot_resize_down_when_pane_below_is_at_minimum_height() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output diff --git a/src/tests/integration/resize_left.rs b/src/tests/integration/resize_left.rs index d31dd6d2c..5d498e964 100644 --- a/src/tests/integration/resize_left.rs +++ b/src/tests/integration/resize_left.rs @@ -5,7 +5,7 @@ use crate::tests::fakes::FakeInputOutput; use crate::tests::utils::{get_next_to_last_snapshot, get_output_frame_snapshots}; use crate::{start, CliArgs}; -use crate::common::input::config::Config; +use crate::common::input::{config::Config, options::Options}; use crate::tests::utils::commands::{ MOVE_FOCUS_IN_PANE_MODE, PANE_MODE, QUIT, RESIZE_LEFT_IN_RESIZE_MODE, RESIZE_MODE, RESIZE_UP_IN_RESIZE_MODE, SLEEP, SPLIT_DOWN_IN_PANE_MODE, SPLIT_RIGHT_IN_PANE_MODE, @@ -44,6 +44,7 @@ pub fn resize_left_with_pane_to_the_left() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -87,6 +88,7 @@ pub fn resize_left_with_pane_to_the_right() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -132,6 +134,7 @@ pub fn resize_left_with_panes_to_the_left_and_right() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -180,6 +183,7 @@ pub fn resize_left_with_multiple_panes_to_the_left() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -230,6 +234,7 @@ pub fn resize_left_with_panes_to_the_left_aligned_top_with_current_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -277,6 +282,7 @@ pub fn resize_left_with_panes_to_the_right_aligned_top_with_current_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -326,6 +332,7 @@ pub fn resize_left_with_panes_to_the_left_aligned_bottom_with_current_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -374,6 +381,7 @@ pub fn resize_left_with_panes_to_the_right_aligned_bottom_with_current_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -427,6 +435,7 @@ pub fn resize_left_with_panes_to_the_left_aligned_top_and_bottom_with_current_pa CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -482,6 +491,7 @@ pub fn resize_left_with_panes_to_the_right_aligned_top_and_bottom_with_current_p CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -554,6 +564,7 @@ pub fn resize_left_with_panes_to_the_left_aligned_top_and_bottom_with_panes_abov CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -629,6 +640,7 @@ pub fn resize_left_with_panes_to_the_right_aligned_top_and_bottom_with_panes_abo CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -671,6 +683,7 @@ pub fn cannot_resize_left_when_pane_to_the_left_is_at_minimum_width() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output diff --git a/src/tests/integration/resize_right.rs b/src/tests/integration/resize_right.rs index e5ea1b9dc..8be15315f 100644 --- a/src/tests/integration/resize_right.rs +++ b/src/tests/integration/resize_right.rs @@ -5,7 +5,7 @@ use crate::tests::fakes::FakeInputOutput; use crate::tests::utils::{get_next_to_last_snapshot, get_output_frame_snapshots}; use crate::{start, CliArgs}; -use crate::common::input::config::Config; +use crate::common::input::{config::Config, options::Options}; use crate::tests::utils::commands::{ MOVE_FOCUS_IN_PANE_MODE, PANE_MODE, QUIT, RESIZE_MODE, RESIZE_RIGHT_IN_RESIZE_MODE, RESIZE_UP_IN_RESIZE_MODE, SLEEP, SPLIT_DOWN_IN_PANE_MODE, SPLIT_RIGHT_IN_PANE_MODE, @@ -44,6 +44,7 @@ pub fn resize_right_with_pane_to_the_left() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -87,6 +88,7 @@ pub fn resize_right_with_pane_to_the_right() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -132,6 +134,7 @@ pub fn resize_right_with_panes_to_the_left_and_right() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -180,6 +183,7 @@ pub fn resize_right_with_multiple_panes_to_the_left() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -230,6 +234,7 @@ pub fn resize_right_with_panes_to_the_left_aligned_top_with_current_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -277,6 +282,7 @@ pub fn resize_right_with_panes_to_the_right_aligned_top_with_current_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -326,6 +332,7 @@ pub fn resize_right_with_panes_to_the_left_aligned_bottom_with_current_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -374,6 +381,7 @@ pub fn resize_right_with_panes_to_the_right_aligned_bottom_with_current_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -427,6 +435,7 @@ pub fn resize_right_with_panes_to_the_left_aligned_top_and_bottom_with_current_p CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -482,6 +491,7 @@ pub fn resize_right_with_panes_to_the_right_aligned_top_and_bottom_with_current_ CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -554,6 +564,7 @@ pub fn resize_right_with_panes_to_the_left_aligned_top_and_bottom_with_panes_abo CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -628,6 +639,7 @@ pub fn resize_right_with_panes_to_the_right_aligned_top_and_bottom_with_panes_ab CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -670,6 +682,7 @@ pub fn cannot_resize_right_when_pane_to_the_left_is_at_minimum_width() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output diff --git a/src/tests/integration/resize_up.rs b/src/tests/integration/resize_up.rs index 148193317..ba810a9f3 100644 --- a/src/tests/integration/resize_up.rs +++ b/src/tests/integration/resize_up.rs @@ -5,7 +5,7 @@ use crate::tests::fakes::FakeInputOutput; use crate::tests::utils::{get_next_to_last_snapshot, get_output_frame_snapshots}; use crate::{start, CliArgs}; -use crate::common::input::config::Config; +use crate::common::input::{config::Config, options::Options}; use crate::tests::utils::commands::{ MOVE_FOCUS_IN_PANE_MODE, PANE_MODE, QUIT, RESIZE_LEFT_IN_RESIZE_MODE, RESIZE_MODE, RESIZE_UP_IN_RESIZE_MODE, SLEEP, SPLIT_DOWN_IN_PANE_MODE, SPLIT_RIGHT_IN_PANE_MODE, @@ -46,6 +46,7 @@ pub fn resize_up_with_pane_above() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -91,6 +92,7 @@ pub fn resize_up_with_pane_below() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -141,6 +143,7 @@ pub fn resize_up_with_panes_above_and_below() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -190,6 +193,7 @@ pub fn resize_up_with_multiple_panes_above() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -240,6 +244,7 @@ pub fn resize_up_with_panes_above_aligned_left_with_current_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -291,6 +296,7 @@ pub fn resize_up_with_panes_below_aligned_left_with_current_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -340,6 +346,7 @@ pub fn resize_up_with_panes_above_aligned_right_with_current_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -390,6 +397,7 @@ pub fn resize_up_with_panes_below_aligned_right_with_current_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -443,6 +451,7 @@ pub fn resize_up_with_panes_above_aligned_left_and_right_with_current_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -498,6 +507,7 @@ pub fn resize_up_with_panes_below_aligned_left_and_right_with_current_pane() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -570,6 +580,7 @@ pub fn resize_up_with_panes_above_aligned_left_and_right_with_panes_to_the_left_ CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -644,6 +655,7 @@ pub fn resize_up_with_panes_below_aligned_left_and_right_with_to_the_left_and_ri CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -686,6 +698,7 @@ pub fn cannot_resize_up_when_pane_above_is_at_minimum_height() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output diff --git a/src/tests/integration/tabs.rs b/src/tests/integration/tabs.rs index 0c7516342..1d8a2c9d3 100644 --- a/src/tests/integration/tabs.rs +++ b/src/tests/integration/tabs.rs @@ -5,7 +5,7 @@ use crate::tests::utils::{get_next_to_last_snapshot, get_output_frame_snapshots} use crate::{panes::PositionAndSize, tests::utils::commands::CLOSE_PANE_IN_PANE_MODE}; use crate::{start, CliArgs}; -use crate::common::input::config::Config; +use crate::common::input::{config::Config, options::Options}; use crate::tests::utils::commands::{ CLOSE_TAB_IN_TAB_MODE, NEW_TAB_IN_TAB_MODE, PANE_MODE, QUIT, SPLIT_DOWN_IN_PANE_MODE, SWITCH_NEXT_TAB_IN_TAB_MODE, SWITCH_PREV_TAB_IN_TAB_MODE, TAB_MODE, @@ -38,6 +38,7 @@ pub fn open_new_tab() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -74,6 +75,7 @@ pub fn switch_to_prev_tab() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -110,6 +112,7 @@ pub fn switch_to_next_tab() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -146,6 +149,7 @@ pub fn close_tab() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -183,6 +187,7 @@ pub fn close_last_pane_in_a_tab() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -222,6 +227,7 @@ pub fn close_the_middle_tab() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -266,6 +272,7 @@ pub fn close_the_tab_that_has_a_pane_in_fullscreen() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -302,6 +309,7 @@ pub fn closing_last_tab_exits_the_app() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output diff --git a/src/tests/integration/terminal_window_resize.rs b/src/tests/integration/terminal_window_resize.rs index 057c2523b..7c06609af 100644 --- a/src/tests/integration/terminal_window_resize.rs +++ b/src/tests/integration/terminal_window_resize.rs @@ -1,7 +1,7 @@ use crate::panes::PositionAndSize; use ::insta::assert_snapshot; -use crate::common::input::config::Config; +use crate::common::input::{config::Config, options::Options}; use crate::tests::fakes::FakeInputOutput; use crate::tests::utils::commands::QUIT; use crate::tests::utils::{get_next_to_last_snapshot, get_output_frame_snapshots}; @@ -35,6 +35,7 @@ pub fn window_width_decrease_with_one_pane() { opts, Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -71,6 +72,7 @@ pub fn window_width_increase_with_one_pane() { opts, Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -107,6 +109,7 @@ pub fn window_height_increase_with_one_pane() { opts, Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer @@ -143,6 +146,7 @@ pub fn window_width_and_height_decrease_with_one_pane() { opts, Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output .stdout_writer diff --git a/src/tests/integration/toggle_fullscreen.rs b/src/tests/integration/toggle_fullscreen.rs index 0e967bd25..8a63bbeaa 100644 --- a/src/tests/integration/toggle_fullscreen.rs +++ b/src/tests/integration/toggle_fullscreen.rs @@ -5,7 +5,7 @@ use crate::tests::fakes::FakeInputOutput; use crate::tests::utils::{get_next_to_last_snapshot, get_output_frame_snapshots}; use crate::{start, CliArgs}; -use crate::common::input::config::Config; +use crate::common::input::{config::Config, options::Options}; use crate::tests::utils::commands::{ MOVE_FOCUS_IN_PANE_MODE, PANE_MODE, QUIT, SPLIT_DOWN_IN_PANE_MODE, SPLIT_RIGHT_IN_PANE_MODE, TOGGLE_ACTIVE_TERMINAL_FULLSCREEN_IN_PANE_MODE, @@ -37,6 +37,7 @@ pub fn adding_new_terminal_in_fullscreen() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output @@ -72,6 +73,7 @@ pub fn move_focus_is_disabled_in_fullscreen() { CliArgs::default(), Box::new(fake_input_output.clone()), Config::default(), + Options::default(), ); let output_frames = fake_input_output diff --git a/zellij-tile/src/data.rs b/zellij-tile/src/data.rs index 4ff44eacf..c1b9c30ef 100644 --- a/zellij-tile/src/data.rs +++ b/zellij-tile/src/data.rs @@ -143,7 +143,13 @@ pub struct PluginIds { pub zellij_pid: u32, } -#[derive(Debug, Default, Copy, Clone, PartialEq, Eq, Hash, Deserialize, Serialize)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Deserialize, Serialize)] pub struct PluginCapabilities { pub arrow_fonts: bool, } + +impl Default for PluginCapabilities { + fn default() -> PluginCapabilities { + PluginCapabilities { arrow_fonts: true } + } +}