mirror of
https://github.com/FliegendeWurst/tmux-thumbs.git
synced 2024-11-22 12:54:59 +00:00
Fix paste automatically
This commit is contained in:
parent
b1200599bf
commit
4f34101c23
10
src/main.rs
10
src/main.rs
@ -85,7 +85,9 @@ fn main() {
|
||||
let lines = output.split("\n").collect::<Vec<&str>>();
|
||||
|
||||
let mut state = state::State::new(lines, alphabet);
|
||||
let mut paste = false;
|
||||
|
||||
{
|
||||
let mut rustbox = match RustBox::init(Default::default()) {
|
||||
Result::Ok(v) => v,
|
||||
Result::Err(e) => panic!("{}", e),
|
||||
@ -176,8 +178,7 @@ fn main() {
|
||||
exec_command(format!("tmux set-buffer {}", mat.text));
|
||||
|
||||
if key == key.to_uppercase() {
|
||||
// FIXME
|
||||
exec_command(format!("tmux paste-buffer"));
|
||||
paste = true;
|
||||
}
|
||||
|
||||
break;
|
||||
@ -196,4 +197,9 @@ fn main() {
|
||||
_ => { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if paste {
|
||||
exec_command(format!("tmux paste-buffer"));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user