Skip to content

Colored prompts behave incorrectly on Windows #562

@acikek

Description

@acikek

Using the crate ansi_term, I added color to a prompt. On my Linux machine, this works as expected. On Windows, however, the behavior is a little strange. For this example, I have an arrow prompt => colored blue.

  • Initially, the prompt is indented.
    image
  • If you hit backspace, the entered text shifts to the correct position, but the cursor stays on the right.
    image
  • From here, you can type the prompt again from the cursor positon...
    image
  • And the characters get pushed back again on backspace.
    image

I'm not sure why this is happening, or if this is an issue with rustyline or just Windows itself (this also happens on PowerShell). Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions