mirror of
https://github.com/FliegendeWurst/tmux-thumbs.git
synced 2024-11-22 12:54:59 +00:00
Fix bug with short alphabets
This commit is contained in:
parent
e52cdad091
commit
02eacd4144
@ -104,7 +104,7 @@ fn main() {
|
||||
|
||||
let mut typed_hint: String = "".to_owned();
|
||||
let matches = state.matches(reverse, unique);
|
||||
let longest_hint = matches.last().unwrap().hint.clone().unwrap().len();
|
||||
let longest_hint = matches.iter().filter(|&m| m.hint.clone().is_some()).last().unwrap().hint.clone().expect("Unknown hint").len();
|
||||
|
||||
loop {
|
||||
let mut selected = matches.last();
|
||||
|
@ -57,7 +57,7 @@ impl<'a> State<'a> {
|
||||
hint: None
|
||||
});
|
||||
|
||||
chunk = chunk.get(first_match.end()..).unwrap();
|
||||
chunk = chunk.get(first_match.end()..).expect("Unknown chunk");
|
||||
offset = offset + first_match.end() as i32;
|
||||
} else {
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user