mirror of
https://github.com/nushell/reedline.git
synced 2024-09-11 15:55:50 +03:00
update history menu (#362)
This commit is contained in:
parent
69fad67b90
commit
e982abf7e2
@ -459,13 +459,10 @@ impl Menu for HistoryMenu {
|
||||
) {
|
||||
if let Some(event) = self.event.clone() {
|
||||
match event {
|
||||
MenuEvent::Activate(updated) => {
|
||||
MenuEvent::Activate(_) => {
|
||||
self.reset_position();
|
||||
self.input = Some(line_buffer.get_buffer().to_string());
|
||||
|
||||
if !updated {
|
||||
self.update_values(line_buffer, history, completer);
|
||||
}
|
||||
self.update_values(line_buffer, history, completer);
|
||||
|
||||
self.pages.push(Page {
|
||||
size: self.printable_entries(painter),
|
||||
@ -476,11 +473,8 @@ impl Menu for HistoryMenu {
|
||||
self.active = false;
|
||||
self.input = None;
|
||||
}
|
||||
MenuEvent::Edit(updated) => {
|
||||
if !updated {
|
||||
self.update_values(line_buffer, history, completer);
|
||||
}
|
||||
|
||||
MenuEvent::Edit(_) => {
|
||||
self.update_values(line_buffer, history, completer);
|
||||
self.pages.push(Page {
|
||||
size: self.printable_entries(painter),
|
||||
full: false,
|
||||
|
Loading…
Reference in New Issue
Block a user