Skip to content

terminal: breakWrapAbove reads a compressed history row only when the pair was joined - #68

Open
lawrencecchen wants to merge 6 commits into
fix-formatter-blank-carryfrom
fix-wrap-edge-history-cost
Open

lawrencecchen wants to merge 6 commits into
fix-formatter-blank-carryfrom
fix-wrap-edge-history-cost

Conversation

@lawrencecchen

Copy link
Copy Markdown
Contributor

Summary

Testing

  • Red test b667555 "insertLines and deleteLines at the top row leave a compressed history page compressed". Red proof run: on branch red/wrap-edge-history-cost (the test plus the CI filter, without the fix).
  • Green: this PR's GhosttyNextKit run ("Patch unit tests" includes the new filter).

Changelog

none

…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).
@coderabbitai

coderabbitai Bot commented Oct 31, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c825d1ea-3de5-4507-b02c-491e893f6772

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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.
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