-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
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
Line highlighting does not begin until backspace is pressed #768
Comments
Actually, my mistake: it seems that the default implementation of the I'll keep the issue open since this still seems like an unexpected default behaviour. |
As explain in |
I definitely understand that argument, but that only demonstrates that providing a default implementation of those methods is problematic: it took me quite a while to figure out that there was a method I was, in fact, supposed to override in order to produce the correct behaviour. |
I hope that one day |
I'm implementing some simple syntax highlighting based on
example.rs
. Syntax highlighting only seems to occur once backspace is pressed, and not after each keystroke (i.e: the input line appears unhighlighted until I press backspace at the end of the line, triggering a highlight).At first I thought this was an issue in my own code, but I confirmed this to not be the case by placing
if line.len() > 0 { panic!(); }
within the body of myHighlighter::highlight
function (the> 0
check is just to prevent a panic happening once at startup). As suspected, rustyline allows me to input whatever characters I want, only panicking if backspace is pressed.The text was updated successfully, but these errors were encountered: