summaryrefslogtreecommitdiffstats
path: root/src/commands/command_line.rs
diff options
context:
space:
mode:
authorJeff Zhao <jeff.no.zhao@gmail.com>2023-07-02 11:20:37 -0400
committerJeff Zhao <jeff.no.zhao@gmail.com>2023-07-02 11:20:37 -0400
commite10fae7255557df4e6c2b63a944357cae6b7d94f (patch)
tree5d2c1a60882ebad7dd9dcb4e2acfc227d3a5989b /src/commands/command_line.rs
parentb5cd64c6686cf7871ebe19edd929612f2c626890 (diff)
migrate to rustyline v12
Diffstat (limited to 'src/commands/command_line.rs')
-rw-r--r--src/commands/command_line.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/commands/command_line.rs b/src/commands/command_line.rs
index 9c5aa70..608e5dd 100644
--- a/src/commands/command_line.rs
+++ b/src/commands/command_line.rs
@@ -4,7 +4,7 @@ use crate::config::AppKeyMapping;
use crate::context::AppContext;
use crate::error::JoshutoResult;
use crate::key_command::{AppExecute, Command};
-use crate::ui::views::TuiTextField;
+use crate::ui::views::{DummyListener, TuiTextField};
use crate::ui::AppBackend;
pub fn read_and_execute(
@@ -15,11 +15,12 @@ pub fn read_and_execute(
suffix: &str,
) -> JoshutoResult {
context.flush_event();
+ let mut listener = DummyListener {};
let user_input: Option<String> = TuiTextField::default()
.prompt(":")
.prefix(prefix)
.suffix(suffix)
- .get_input(backend, context);
+ .get_input(backend, context, &mut listener);
if let Some(s) = user_input {
let trimmed = s.trim_start();