mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
fix history record on direct input by using load action, remove extra condition
This commit is contained in:
parent
a6dc8d39ae
commit
58394f84ca
2 changed files with 4 additions and 9 deletions
|
|
@ -148,20 +148,15 @@ impl Request {
|
||||||
entry.connect_activate({
|
entry.connect_activate({
|
||||||
let a = item_action.clone();
|
let a = item_action.clone();
|
||||||
let s = suggestion.clone();
|
let s = suggestion.clone();
|
||||||
move |_| {
|
move |this| {
|
||||||
use gtk::prelude::ActionExt;
|
|
||||||
a.reload.activate(None);
|
|
||||||
s.hide();
|
s.hide();
|
||||||
|
a.load.activate(Some(&this.text()), true, false)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
entry.connect_has_focus_notify({
|
entry.connect_has_focus_notify({
|
||||||
let s = suggestion.clone();
|
let s = suggestion.clone();
|
||||||
move |_| {
|
move |_| s.hide()
|
||||||
if s.is_visible() {
|
|
||||||
s.hide()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
entry.connect_state_flags_changed({
|
entry.connect_state_flags_changed({
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,7 @@ impl Suggestion {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
self.popover.popdown();
|
self.popover.popdown()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue