Skip to content

[Windows] Reassert autowrap after console setup#753

Open
scramsby wants to merge 1 commit into
MisterTea:masterfrom
scramsby:scramsby-winlinewrap
Open

[Windows] Reassert autowrap after console setup#753
scramsby wants to merge 1 commit into
MisterTea:masterfrom
scramsby:scramsby-winlinewrap

Conversation

@scramsby
Copy link
Copy Markdown
Contributor

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

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
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.36%. Comparing base (a2d2e62) to head (8ad8063).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant