aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-client/src/input_handler.rs
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2022-03-16 09:42:48 +0100
committerAram Drevekenin <aram@poor.dev>2022-03-16 09:42:58 +0100
commit08d2014cfea1583059338a338bc4d5f632763fdb (patch)
treeb4830e8926aaca13e03b3917c7f78d8e0bca05f9 /zellij-client/src/input_handler.rs
parentadd(readme): built-with-nix badge (#1220) (diff)
downloadsl0ppij-08d2014cfea1583059338a338bc4d5f632763fdb.tar.gz
sl0ppij-08d2014cfea1583059338a338bc4d5f632763fdb.tar.xz
sl0ppij-08d2014cfea1583059338a338bc4d5f632763fdb.zip
hotfix: do not send bracketed paste to panes where it is not on
Diffstat (limited to 'zellij-client/src/input_handler.rs')
-rw-r--r--zellij-client/src/input_handler.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/zellij-client/src/input_handler.rs b/zellij-client/src/input_handler.rs
index 58d060bf..020c5516 100644
--- a/zellij-client/src/input_handler.rs
+++ b/zellij-client/src/input_handler.rs
@@ -63,6 +63,8 @@ impl InputHandler {
let mut err_ctx = OPENCALLS.with(|ctx| *ctx.borrow());
err_ctx.add_call(ContextType::StdinHandler);
let alt_left_bracket = vec![27, 91];
+ let bracketed_paste_start = vec![27, 91, 50, 48, 48, 126]; // \u{1b}[200~
+ let bracketed_paste_end = vec![27, 91, 50, 48, 49, 126]; // \u{1b}[201~
if self.options.mouse_mode.unwrap_or(true) {
self.os_input.enable_mouse();
}
@@ -97,7 +99,9 @@ impl InputHandler {
}
Ok((InputInstruction::PastedText(raw_bytes), _error_context)) => {
if self.mode == InputMode::Normal || self.mode == InputMode::Locked {
+ self.dispatch_action(Action::Write(bracketed_paste_start.clone()));
self.dispatch_action(Action::Write(raw_bytes));
+ self.dispatch_action(Action::Write(bracketed_paste_end.clone()));
}
}
Ok((InputInstruction::SwitchToMode(input_mode), _error_context)) => {