We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With the latest rustyline, if you do the following steps, you get a corrupted input line. You can repro this using the same app
cargo run --example example
Next, type something into one line:
1> this is a test file Line: this is a test file
Next, press up, to get to the previous line, move the arrow to get to the word test and backspace to delete it.
test
This is what it looks like when I do this:
Notice the line is now corrupted and is showing both the editing line and something from the previous history of the line.
The text was updated successfully, but these errors were encountered:
The highlighted/bold text is the suggestion/hint based on history. The current implementation does not check if the cursor is at the end of the line / if the whole line matches a previous history entry. https://github.com/kkawakam/rustyline/blob/master/src/hint.rs#L37
fn hint(&self, line: &str, pos: usize, ctx: &Context<'_>) -> Option<String> { ... if let Some(history_index) = ctx.history .starts_with(&line[..pos], start, Direction::Reverse) ...
Sorry, something went wrong.
liner does not display any suggestion while editing an history entry: https://github.com/redox-os/liner/blob/master/src/editor.rs#L863
liner
// If we are editing a previous history item no autosuggestion. if self.hist_buf_valid { return None; }
See #240
That fix works for me, thanks!
No branches or pull requests
With the latest rustyline, if you do the following steps, you get a corrupted input line. You can repro this using the same app
Next, type something into one line:
Next, press up, to get to the previous line, move the arrow to get to the word
test
and backspace to delete it.This is what it looks like when I do this:
Notice the line is now corrupted and is showing both the editing line and something from the previous history of the line.
The text was updated successfully, but these errors were encountered: