Skip to content
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

Windows line wrap doesn't linefeed #351

Closed
AE9RB opened this issue Mar 13, 2020 · 5 comments · Fixed by #368
Closed

Windows line wrap doesn't linefeed #351

AE9RB opened this issue Mar 13, 2020 · 5 comments · Fixed by #368

Comments

@AE9RB
Copy link

AE9RB commented Mar 13, 2020

Both V6 and V5 show this behavior in Windows. It works fine in Linux. Run an example and type past the end of the line; you'll be typing over the first line. Backspace past the start of a line and the input starts moving up the screen. Reproduces in PowerShell and CMD in the old terminal (conhost.exe), new Windows Terminal, and VSCode terminal.

@gwenn
Copy link
Collaborator

gwenn commented Mar 13, 2020

Indeed,
At least versions 4, 5 and 6 are impacted (repaint / refresh is buggy).
And latest panics !
I don't have access to a windows machine at home and only limited access at work.
I may be able to reproduce with Wine.
Regards.

@gwenn
Copy link
Collaborator

gwenn commented Mar 14, 2020

I cannot reproduce with Wine. But I will try to debug and fix it on Windows.

@gwenn
Copy link
Collaborator

gwenn commented Mar 31, 2020

Could you please confirm that it happens only on Windows 10 ?
Currently rustyline is using ENABLE_WRAP_AT_EOL_OUTPUT (which is activated by default).
And there seems to be a bug when you mix both ENABLE_WRAP_AT_EOL_OUTPUT and ENABLE_VIRTUAL_TERMINAL_PROCESSING: microsoft/terminal#349
Before Windows 10, ENABLE_VIRTUAL_TERMINAL_PROCESSING is not supported so we are not impacted.

gwenn added a commit to gwenn/rustyline that referenced this issue Apr 2, 2020
As a workaround to bug on Windows 10 (see kkawakam#351),
disable ENABLE_VIRTUAL_TERMINAL_PROCESSING when colors are disabled.
@gwenn
Copy link
Collaborator

gwenn commented Apr 2, 2020

As a temporary/dirty workaround, you can disable colors (ColorMode::Disabled) to make line wrapping works on Windows 10.

@gwenn
Copy link
Collaborator

gwenn commented Apr 23, 2020

Should be fixed in 6.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants