Repository navigation
screen(fix[erase]): Sever wraps once per span - #209
Merged
Merged
Conversation
why: Full-row display erases checked _sever_incoming_wrap on every cleared row even when the predecessor row had already been cleared in the same non-selective span, and DECCOLM clears skipped severing incoming scrollback wraps. what: - Add Screen._clear_rows with a consistent sever_boundary contract across non-selective and selective erases - Route ED 0/1/2/22 and DECCOLM full-row clears through _clear_rows and guard EL 0 / ED 0 incoming-wrap checks to c_col <= 1 - Add regression tests for bounded wrap checks, wrap/history boundaries, narrow-to-wide splits, DECCOLM, BCE, cols=1, DECSED, and ?2026 CoW - Record the fix in CHANGES under 0.0.1a7 Fixes Fixes #199
35 of 38 tasks
This branch was successfully deployed
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.
Fixes #199
Summary
Screen._clear_rows(start, stop, bce_word, bce_ext, *, selective=False, sever_boundary=True)insrc/libvt/screen.pywith a unifiedsever_boundarycontract across both non-selective (reset_blank) and selective (DECSED) spans, severing incoming wraps once at the surviving predecessor boundary rather than per cleared row.ED 0,ED 1,ED 2,ED 22(alt), andDECCOLMfull-row clears through_clear_rows, guardsED 0/EL 0incoming-wrap checks toc_col <= 1, and alignsDECCOLMclears to sever incoming scrollback wraps (honoringProfile.screen.erase_severs_history_wrap).#199_sever_incoming_wrapcalls from10,000to400(-96%) and improves redraw-heavy throughput by +17% to +42% with no regressions on partial erases or plain printing.DECCOLM, wide-cell,DECSED, BCE (ED 0/1/2),cols=1,?2026held/committed, and CoW isolation tests intests/test_screen.py.Verification
ED/EL), DEC STD 070 (DECSED/DECSEL/DECCOLM), 4 permissive lineages (tmux,ghostty,alacritty,wezterm), whole/bytewise replay, and livetmux 3.4private-socket parity.ty(3.12–3.15 +win323.12),pytest(1258 passed, 2 skipped), Sphinxdirhtml -W(0 warnings).adopt as is(Gates 1–4 PASS, 5/5 mutants killed, new code 9.6/10, all applicable items 9.5–9.8/10).