Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Retained live regions reorder viewport rows after a scroll #197

Done

Description

@tony

Summary

A live RegionView retained across output can return rows in a different order from the visible viewport. The screen recycles its backing rows as it scrolls. The retained region still holds the original row objects. Nested live crops in #193 inherit that lifetime.

Reproduction

  1. From a libvt checkout, run this public API example.
uv run python - <<'PY'
from libvt import Terminal

term = Terminal(rows=3, cols=5)
term.feed(b"A\r\nB\r\nC")
region, row, frozen = term[:], term[0], term.committed[:]
term.feed(b"\r\nD")
print(region.lines, term[:].lines, row.text, frozen.lines)
PY

Expected

The retained live rectangle and a fresh slice at the same coordinates both read B, C, D. The captured rectangle still reads A, B, C.

Actual

('D', 'B', 'C') ('B', 'C', 'D') B ('A', 'B', 'C')

Environment

Revisions tested

Linux aarch64, CPython 3.15.2. Reproduced on master 299c9d9 and the omnibus 4c0bf02.

References

#2 introduced the captured row references and coordinate-following direct rows. #100 addresses direct row width, and #183 implements that fix. The nested-crop change belongs to #193. Verify scroll, replacement of rows by reflow, cropped columns, and snapshot isolation at the public read model.

Activity

  1. added
    bug
    p1
    area:core
    topic:api
    topic:identity
    python
    on Dec 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:corebugp1pythontopic:apitopic:identity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions