[Windows] Reassert autowrap after console setup#753
Open
scramsby wants to merge 1 commit into
Open
Conversation
Description: Windows ET setup changes console output modes to enable VT processing and DISABLE_NEWLINE_AUTO_RETURN. On affected Windows terminal hosts, long readline input can then repaint over the same visual row instead of wrapping, even though a DECRQM query still reports DECAWM enabled. Preserve the existing console mode bits and explicitly include ENABLE_WRAP_AT_EOL_OUTPUT so setup does not unnecessarily clear normal wrapping-related console state. That alone was tested and was not sufficient to fix the regression; the empirically required step is re-emitting DEC autowrap enable after the output mode change. DISABLE_NEWLINE_AUTO_RETURN remains intentional because removing it would regress full-screen terminal apps such as tmux, where it suppresses incorrect scrolling when content reaches the right edge of the terminal window. Test plan: Built the Windows et target locally; verified a raw ET session from Windows wraps long command input correctly after reconnecting; verified tmux full-screen scrolling still works without duplicated status elements from improper terminal-edge scrolling
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #753 +/- ##
==========================================
- Coverage 87.46% 87.36% -0.10%
==========================================
Files 71 71
Lines 5368 5368
Branches 501 502 +1
==========================================
- Hits 4695 4690 -5
- Misses 673 678 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Windows ET setup changes console output modes to enable VT processing and DISABLE_NEWLINE_AUTO_RETURN. On affected Windows terminal hosts, long readline input can then repaint over the same visual row instead of wrapping, even though a DECRQM query still reports DECAWM enabled. Preserve the existing console mode bits and explicitly include ENABLE_WRAP_AT_EOL_OUTPUT so setup does not unnecessarily clear normal wrapping-related console state. That alone was tested and was not sufficient to fix the regression; the empirically required step is re-emitting DEC autowrap enable after the output mode change. DISABLE_NEWLINE_AUTO_RETURN remains intentional because removing it would regress full-screen terminal apps such as tmux, where it suppresses incorrect scrolling when content reaches the right edge of the terminal window.
Test plan:
Built the Windows et target locally; verified a raw ET session from Windows wraps long command input correctly after reconnecting; verified tmux full-screen scrolling still works without duplicated status elements from improper terminal-edge scrolling