mirror of
https://github.com/TECHNOFAB11/tmux-copyrat.git
synced 2025-12-14 00:43:51 +01:00
feat: implement y/Y yank
This commit is contained in:
parent
372781e231
commit
31e0d5cc9e
1 changed files with 9 additions and 0 deletions
|
|
@ -360,6 +360,15 @@ impl<'a> View<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
event::Key::Char(_ch @ 'y') => {
|
||||||
|
let text = self.matches.get(self.focus_index).unwrap().text;
|
||||||
|
return Event::Match((text.to_string(), false));
|
||||||
|
}
|
||||||
|
event::Key::Char(_ch @ 'Y') => {
|
||||||
|
let text = self.matches.get(self.focus_index).unwrap().text;
|
||||||
|
return Event::Match((text.to_string(), true));
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: use a Trie or another data structure to determine
|
// TODO: use a Trie or another data structure to determine
|
||||||
// if the entered key belongs to a longer hint.
|
// if the entered key belongs to a longer hint.
|
||||||
// Attempts at finding a match with a corresponding hint.
|
// Attempts at finding a match with a corresponding hint.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue