Line wrap not working in Windows Terminal
See original GitHub issueHi, it seems that line wrap is not working when using Windows Terminal (wt
) instead of the default terminal emulator used by pwsh.exe
/cmd.exe
.
I also did a quick check of running radian
within wt
inside WSL2-Ubuntu-bash
instead of pwsh
and suprisingly there it worked:
So my feeling is, that is has to do with some environment variables that need to be set or some special workarounds that radian does when running on windows, which aren’t required for wt
. (I tested all options that can be set through .radian_profile
, e.g. radian.auto_width
without success).
Used versions checks on windows:
- Windows Terminal Preview Version: 1.9.1523.0
- Radian: 0.5.11
- Python: 3.8.8
- R: 4.0.5
Used versions for check on WSL2:
- Radian: 0.5.11
- Python: 3.8.5
- R: 3.6.3
Any advice on how to fix/debug this issue would be greatly appreciated.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Ability to disable line wrapping in Windows Terminal #6895
Currently Windows Terminal wraps lines by default. It would be great to give an option (in settings json) or a shortcut to toggle...
Read more >Turn On or Off Wrap Text Output on Resize of Console ...
If you set to use legacy console, then the Wrap text output on resize feature and setting will be disabled and grayed out....
Read more >Enable Line Wrapping Selection in CMD on Windows 10
Step 3: In the "Command Prompt" Properties dialog, open Options, select Enable line wrapping selection under Text Selection, and then tap OK. Related...
Read more >How to Enable or Disable Line Wrapping Selection in Console ...
How to Enable or Disable Line Wrapping Selection in Console Window in Windows 10This tutorial will show you how to enable or disable...
Read more >Allow a user to disable line wrapping in the terminal - YouTrack
the wrapping length for python output on Windows is only 80 characters while running the script on the Windows command prompt will not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah, I did not notice that you were using you’re own prompt-toolkit version. Thanks for the explanation. In this case I can see that updating prompt-toolkit has a good chance to solve the problem.
So from my side it would be ok to close the issue now, unless you want to leave it open for other Windows Terminal users who might run into the same problem?
Thanks for the hint. I checked which version of prompt toolkit I have installed and it’s actually 3.0.18, but I think you’re right anyways.
I tried to step through the code to find out where the line gets cut off and it seems to happen in line 171-172 of
console.py
(in theoutput.write_raw(buf); output.flush()
part.As a workaround I replaced the
output.write_raw(buf); output.flush()
withsys.stdout.write(buf); sys.stdout.flush()
and it seems to work for now 🥳