diff --git a/zellij-client/src/stdin_handler.rs b/zellij-client/src/stdin_handler.rs index 2cd307ea7d..177f08e180 100644 --- a/zellij-client/src/stdin_handler.rs +++ b/zellij-client/src/stdin_handler.rs @@ -94,8 +94,20 @@ pub(crate) fn stdin_loop( pasting = false; } None => { + let starts_with_bracketed_paste_start = stdin_buffer + .iter() + .take(bracketed_paste_start.len()) + .eq(bracketed_paste_start.iter()); + if starts_with_bracketed_paste_start { + drop(stdin_buffer.drain(..6)); // bracketed paste start + } + send_input_instructions - .send(InputInstruction::PastedText((true, stdin_buffer, false))) + .send(InputInstruction::PastedText(( + starts_with_bracketed_paste_start, + stdin_buffer, + false, + ))) .unwrap(); pasting = true; continue; diff --git a/zellij-server/src/panes/terminal_character.rs b/zellij-server/src/panes/terminal_character.rs index e6a9d85cfa..a46fbf9cd7 100644 --- a/zellij-server/src/panes/terminal_character.rs +++ b/zellij-server/src/panes/terminal_character.rs @@ -109,7 +109,7 @@ impl NamedColor { } } -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Default)] pub struct CharacterStyles { pub foreground: Option, pub background: Option, @@ -125,25 +125,6 @@ pub struct CharacterStyles { pub link_anchor: Option, } -impl Default for CharacterStyles { - fn default() -> Self { - Self { - foreground: None, - background: None, - strike: None, - hidden: None, - reverse: None, - slow_blink: None, - fast_blink: None, - underline: None, - bold: None, - dim: None, - italic: None, - link_anchor: None, - } - } -} - impl CharacterStyles { pub fn new() -> Self { Self::default() diff --git a/zellij-server/src/tab.rs b/zellij-server/src/tab.rs index bb44d2784d..1559361112 100644 --- a/zellij-server/src/tab.rs +++ b/zellij-server/src/tab.rs @@ -946,7 +946,7 @@ impl Tab { .or_insert_with(|| Boundaries::new(self.viewport)); pane_contents_and_ui.render_pane_boundaries( *client_id, - &mut boundaries, + boundaries, self.session_is_mirrored, ); } diff --git a/zellij-server/src/ui/overlay/mod.rs b/zellij-server/src/ui/overlay/mod.rs index 3bac1afb58..b0c1599597 100644 --- a/zellij-server/src/ui/overlay/mod.rs +++ b/zellij-server/src/ui/overlay/mod.rs @@ -44,19 +44,11 @@ impl Overlayable for OverlayType { /// Entrypoint from [`Screen`], which holds the context in which /// the overlays are being rendered. /// The most recent overlays draw over the previous overlays. -#[derive(Clone, Debug)] +#[derive(Clone, Debug, Default)] pub struct OverlayWindow { pub overlay_stack: Vec, } -impl Default for OverlayWindow { - fn default() -> Self { - Self { - overlay_stack: vec![], - } - } -} - impl Overlayable for OverlayWindow { fn generate_overlay(&self, size: Size) -> String { let mut output = String::new(); diff --git a/zellij-utils/src/input/layout.rs b/zellij-utils/src/input/layout.rs index e06f20018d..76625645da 100644 --- a/zellij-utils/src/input/layout.rs +++ b/zellij-utils/src/input/layout.rs @@ -162,7 +162,7 @@ pub struct LayoutFromYamlIntermediate { // The struct that is used to deserialize the layout from // a yaml configuration file -#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] +#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Default)] #[serde(crate = "self::serde")] #[serde(default)] pub struct LayoutFromYaml { @@ -775,17 +775,6 @@ impl Default for LayoutTemplate { } } -impl Default for LayoutFromYaml { - fn default() -> Self { - Self { - session: SessionFromYaml::default(), - template: LayoutTemplate::default(), - borderless: false, - tabs: vec![], - } - } -} - impl Default for Direction { fn default() -> Self { Direction::Horizontal