Open
Description
I have just an hello world project with few lines of code:
use reedline::{DefaultPrompt, DefaultPromptSegment, Reedline, Signal};
fn main() {
let mut line_editor = Reedline::create();
let prompt = DefaultPrompt::new(DefaultPromptSegment::Basic("ok".to_string()), DefaultPromptSegment::Empty);
loop {
let sig = line_editor.read_line(&prompt);
match sig {
Ok(Signal::Success(buffer)) => {
println!("We processed: {}", buffer);
},
Ok(Signal::CtrlD) | Ok(Signal::CtrlC) => {
println!("\nAborted!");
break;
},
_ => { },
}
}
}
}
When I run this very simple project, with a very short text prompt, I have noticed that when I press the left or right arrows, there is some kind of delay - internally - that makes the cursor not responsive!
Indeed, if I leave the arrow keys, I noticed that the cursor is still moving, and doesn't stop immediately.
Again, it's like there is a little and subtle delay, but very annoying.
I've attached a video to show this, as you can see from the video, when I leave my finger from the arrow key, the cursor is still moving...
NOTE: This DOES NOT happen with other command-lines prompt crates.