This commit is contained in:
Takayuki Maeda 2021-09-12 15:10:03 +09:00
parent 8cb0b12944
commit 7ea0c08a63

View File

@ -197,7 +197,7 @@ impl Component for TableFilterComponent {
// apply comletion candidates // apply comletion candidates
if key == self.key_config.enter { if key == self.key_config.enter {
return self.complete() return self.complete();
} }
self.completion.selected_candidate(); self.completion.selected_candidate();
@ -289,7 +289,7 @@ mod test {
} }
#[test] #[test]
fn test_complete_no_candidate() { fn test_complete_no_candidates() {
let mut filter = TableFilterComponent::new(KeyConfig::default()); let mut filter = TableFilterComponent::new(KeyConfig::default());
filter.input_idx = 2; filter.input_idx = 2;
filter.input = vec!['a', 'n', ' ', 'c', 'd', 'e', 'f', 'g']; filter.input = vec!['a', 'n', ' ', 'c', 'd', 'e', 'f', 'g'];