summaryrefslogtreecommitdiffstats
path: root/zellij-client/src/input_handler.rs
diff options
context:
space:
mode:
Diffstat (limited to 'zellij-client/src/input_handler.rs')
-rw-r--r--zellij-client/src/input_handler.rs25
1 files changed, 22 insertions, 3 deletions
diff --git a/zellij-client/src/input_handler.rs b/zellij-client/src/input_handler.rs
index c2d93a0cf..0f8a60ff2 100644
--- a/zellij-client/src/input_handler.rs
+++ b/zellij-client/src/input_handler.rs
@@ -95,10 +95,29 @@ impl InputHandler {
}
}
}
- Ok((InputInstruction::PastedText(raw_bytes), _error_context)) => {
+ Ok((
+ InputInstruction::PastedText((
+ send_bracketed_paste_start,
+ raw_bytes,
+ send_bracketed_paste_end,
+ )),
+ _error_context,
+ )) => {
if self.mode == InputMode::Normal || self.mode == InputMode::Locked {
- let action = Action::Write(raw_bytes);
- self.dispatch_action(action);
+ if send_bracketed_paste_start {
+ let bracketed_paste_start = vec![27, 91, 50, 48, 48, 126]; // \u{1b}[200~
+ let paste_start_action = Action::Write(bracketed_paste_start);
+ self.dispatch_action(paste_start_action);
+ }
+
+ let pasted_text_action = Action::Write(raw_bytes);
+ self.dispatch_action(pasted_text_action);
+
+ if send_bracketed_paste_end {
+ let bracketed_paste_end = vec![27, 91, 50, 48, 49, 126]; // \u{1b}[201~
+ let paste_end_action = Action::Write(bracketed_paste_end);
+ self.dispatch_action(paste_end_action);
+ }
}
}
Ok((InputInstruction::SwitchToMode(input_mode), _error_context)) => {