Repository navigation
terminal: breakWrapAbove reads a compressed history row only when the pair was joined - #68
Open
lawrencecchen wants to merge 6 commits into
Open
lawrencecchen wants to merge 6 commits into
lawrencecchen wants to merge 6 commits into
Conversation
…ry page compressed (red) Review note on 3c717e5: breakWrapAbove read the row above before it checked the flags, so insertLines or deleteLines at the screen's top row restored the last history page from compression, every time. A region scroll can run per output line under load.
… pair was joined It read the row above before it checked the flags, so IL or DL at the top row restored the last history page from compression on every call. Now it decides on the resident side first: the active row's wrap_continuation, or for IL and DL the top row's flag read before the rows move. When neither says joined and the row above is in a compressed page, it returns. printWrap sets both flags of a pair and every clear clears both, so that row cannot wrap into this one. A joined pair still restores the page, as it must.
…the cleared rows' edges (red) Review of #68: clearRows resets each cleared row, but the row above the cleared range kept wrap=true (a history row above active row 0 for ED 2 and DECALN) and the row below kept wrap_continuation=true (the cursor row after ED 1). Reflow and the unwrapping formatter then joined rows that no longer hold one line.
…red rows clearRows resets the cleared rows (ED 0, 1, 2 and DECALN on the active area), but the row above the range kept wrap=true and the row below kept wrap_continuation=true. It now breaks both edges after a full clear (the top row's continuation is read before the clear resets it); a protected clear keeps the row flags and is not changed. The breakWrapAbove comment now says what it checks and names clearRows among the edge operations (it said every clear clears both, which was not true).
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
lawrencecchen
added a commit
that referenced
this pull request
Nov 1, 2026
…the cleared rows' edges (red) Review of #68: clearRows resets each cleared row, but the row above the cleared range kept wrap=true (a history row above active row 0 for ED 2 and DECALN) and the row below kept wrap_continuation=true (the cursor row after ED 1). Reflow and the unwrapping formatter then joined rows that no longer hold one line.
lawrencecchen
added a commit
that referenced
this pull request
Nov 1, 2026
…the cleared rows' edges (red) Review of #68: clearRows resets each cleared row, but the row above the cleared range kept wrap=true (a history row above active row 0 for ED 2 and DECALN) and the row below kept wrap_continuation=true (the cursor row after ED 1). Reflow and the unwrapping formatter then joined rows that no longer hold one line.
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.
Summary
Screen.breakWrapAboveread the row above before it checked the flags. So IL or DL at the screen's top row restored the last history page from compression on every call. Under load, a region scroll can run once per output line.wrap_continuation. For IL and DL, it uses the top row's flag, read before the rows move (top_joined). When the pair was not joined and the row above is in a compressed page, the function returns and leaves the page compressed. A joined pair still restores the page, as it must.Testing
Changelog
none