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

LA
7d ago
+140-15

Summary

  • This is a follow-up to #66, from the review of the cmux pin PR manaflow-ai/cmux#29609.
  • Screen.breakWrapAbove read 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.
  • Now it decides on the resident side first. It uses the active row's 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

  • Red test b667555f4 "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