aboutsummaryrefslogtreecommitdiff
path: root/src/input.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/input.rs')
-rw-r--r--src/input.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/input.rs b/src/input.rs
index f4978336..5e4ad1f8 100644
--- a/src/input.rs
+++ b/src/input.rs
@@ -211,7 +211,7 @@ impl Action {
Action::Paste => {
Clipboard::new()
.and_then(|clipboard| clipboard.load_primary() )
- .map(|contents| { self.paste(ctx, contents) })
+ .map(|contents| { self.paste(ctx, &contents) })
.unwrap_or_else(|err| {
eprintln!("Error loading data from clipboard. {}", Red(err));
});
@@ -222,7 +222,7 @@ impl Action {
if !ctx.terminal_mode().intersects(mouse_modes) {
Clipboard::new()
.and_then(|clipboard| clipboard.load_selection() )
- .map(|contents| { self.paste(ctx, contents) })
+ .map(|contents| { self.paste(ctx, &contents) })
.unwrap_or_else(|err| {
warn!("Error loading data from clipboard. {}", Red(err));
});
@@ -282,7 +282,7 @@ impl Action {
}
}
- fn paste<A: ActionContext>(&self, ctx: &mut A, contents: String) {
+ fn paste<A: ActionContext>(&self, ctx: &mut A, contents: &str) {
if ctx.terminal_mode().contains(TermMode::BRACKETED_PASTE) {
ctx.write_to_pty(&b"\x1b[200~"[..]);
ctx.write_to_pty(contents.replace("\x1b","").into_bytes());