console-rs / dialoguer

Rust utility library for nice command line prompts and similar things
MIT License
1.31k stars 143 forks source link

Duplicate line when wrapped #295

Open HyperCodec opened 9 months ago

HyperCodec commented 9 months ago

Dialoguer uses a clearline char when an input is interacted with to display the checkmarked version, but if the response wraps to the next line in a console that supports wrapping, it only removes the last line, leaving the entire beginning part of the response and creating a duplicate when it displays the checkmarked version.

HyperCodec commented 9 months ago

I discovered this in Input<String> with ColorfulTheme, although it may be a recurring issue in other parts of the lib.