You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 my Highlighter::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.