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

Clear line wrapped state on explicit line feed #4458

Merged
merged 1 commit into from Mar 28, 2023

Conversation

Tyriar
Copy link
Member

@Tyriar Tyriar commented Mar 28, 2023

Fixes #4457
See microsoft/vscode#178014

This fixes the long standing issue of strange underlines on Windows after resizing. I believe it's safe to do this as the linefeed is explicit so will merge now. @jerch your opinions would be helpful here as we can make a new option or extend windowsMode if you don't think it's safe.

@Tyriar Tyriar added this to the 5.2.0 milestone Mar 28, 2023
@Tyriar Tyriar self-assigned this Mar 28, 2023
@Tyriar Tyriar enabled auto-merge March 28, 2023 18:38
@Tyriar Tyriar merged commit 14c6df3 into xtermjs:master Mar 28, 2023
8 checks passed
// reprint is common, especially on resize. Note that the windowsMode wrapped line heuristics
// can mess with this so windowsMode should be disabled, which is recommended on Windows build
// 21376 and above.
this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y)!.isWrapped = false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imho it makes sense to even apply this for all NLs, so a line after an NL has always the wrapped state cleared. At least I cannot think of any exception to this? (And really wonder why we did not have it in code yet, or got test failures, haha...)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, well this else case should cover everything as the 2 cases above are if it's the last row and then a sanity check to clamp the value. Nice to see this bug finally fixed!

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.

Links can be computed on the wrong line data on Windows
2 participants