Skip to content

Line highlighting does not begin until backspace is pressed #768

@zesterer

Description

@zesterer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions