-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Don't reflow a line as wrapped if it broke on the last cell #5368
Closed
Conversation
This file contains 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
…-weird-exact-wrap-resize
…-weird-exact-wrap-resize
…eird-exact-wrap-resize # Conflicts: # src/cascadia/UnitTests_TerminalCore/ConptyRoundtripTests.cpp # src/host/screenInfo.cpp
jsoref
reviewed
Apr 17, 2020
// the cursor to the second line. | ||
// | ||
// Unlike BreakLinesOnCursorMovement, we're only testing the cases where a | ||
// cursor movement actaully broke the line. This test would be much too |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
// cursor movement actaully broke the line. This test would be much too | |
// cursor movement actually broke the line. This test would be much too |
31 tasks
This comment was marked as outdated.
This comment was marked as outdated.
This PR is super old and I'm not coming back to it any time soon. The buffer has changed quite a bit. As noted in #14821 (comment), there might be new ways of fixing this. The buffer's also going through pretty majir rewrites, so best to not have too many cooks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area-Output
Related to output processing (inserting text into buffer, retrieving buffer text, etc.)
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Priority-2
A description (P2)
Product-Conhost
For issues in the Console codebase
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.
Summary of the Pull Request
If we write a character to the last cell of a row, we'll mark that row as wrapped.
If we linefeed at that point, we'll unmark that row as wrapped. (Linefeeds are important here, we learned in #5291/#5294 that all cursor movements don't actually break a line).
However, in
TextBuffer::Reflow
, if we increase the width of that row, we'll actually reflow it and the following row as though the first row wrapped. This is due to aiRight < cOldColsTotal
that should have beeniRight <= cOldColsTotal
.References
PR Checklist
Validation Steps Performed
Tested with the following command in WSL
WriteCharsLegacy
onesI'm drafting this to get feedback on the
<
to<=
fix so far. I'll work on the conpty fix in the meantime