merge checks for single hint
This commit is contained in:
parent
2e0569fe2e
commit
d2298e69a2
@ -72,6 +72,7 @@ impl<'a> HintEnum<'a> {
|
||||
#[allow(dead_code)]
|
||||
pub fn is_some(&self) -> bool { !self.is_none() }
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn is_single(&self) -> bool {
|
||||
match self {
|
||||
HintEnum::Single(_) => true,
|
||||
|
||||
@ -112,13 +112,6 @@ impl<'a> AutoComplete<'a> {
|
||||
|
||||
if let HintEnum::Single(single_hint) = self.hint {
|
||||
func_edit = func_edit.hint_text(*single_hint);
|
||||
}
|
||||
|
||||
let re = func_edit.ui(ui);
|
||||
|
||||
self.update(&new_string);
|
||||
|
||||
if !self.hint.is_single() {
|
||||
if ui.input().key_pressed(Key::ArrowDown) {
|
||||
movement = Movement::Down;
|
||||
} else if ui.input().key_pressed(Key::ArrowUp) {
|
||||
@ -126,6 +119,10 @@ impl<'a> AutoComplete<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
let re = func_edit.ui(ui);
|
||||
|
||||
self.update(&new_string);
|
||||
|
||||
self.interact_back(&movement);
|
||||
|
||||
if movement != Movement::Complete && let HintEnum::Many(hints) = self.hint {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user