From 1c831712afd7ed4ab3233b3635ad5d95f35405e5 Mon Sep 17 00:00:00 2001 From: "hinto.janai" Date: Tue, 26 Dec 2023 12:00:29 -0500 Subject: [PATCH] p2pool: fix input --- src/p2pool.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p2pool.rs b/src/p2pool.rs index 49c08df..73886f2 100644 --- a/src/p2pool.rs +++ b/src/p2pool.rs @@ -64,7 +64,7 @@ impl crate::disk::P2pool { ui.separator(); let response = ui.add_sized([width, text_edit], TextEdit::hint_text(TextEdit::singleline(buffer), r#"Type a command (e.g "help" or "status") and press Enter"#)).on_hover_text(P2POOL_INPUT); // If the user pressed enter, dump buffer contents into the process STDIN - if response.lost_focus() && ui.input().key_pressed(egui::Key::Enter) { + if response.lost_focus() && ui.input(|i| i.key_pressed(egui::Key::Enter)) { response.request_focus(); // Get focus back let buffer = std::mem::take(buffer); // Take buffer let mut process = lock!(process); // Lock