Repository navigation
snapshot(feat): Locate text by cell coordinates - #133
Merged
Merged
Conversation
5 of 6 tasks
tony
force-pushed
the
concept/snapshot-cell-search
branch
from
December 1, 2026 03:29
b387150 to
384d720
Compare
tony
added a commit
that referenced
this pull request
Dec 3, 2026
why: Record the branch's user-visible change in the unreleased notes. what: - Add the #133 entry under What's new in CHANGES
tony
force-pushed
the
concept/snapshot-cell-search
branch
from
December 3, 2026 02:53
384d720 to
5f4a47b
Compare
tony
force-pushed
the
concept/snapshot-cell-search
branch
from
December 3, 2026 23:58
5f4a47b to
08adbaf
Compare
7 tasks done
tony
force-pushed
the
concept/snapshot-cell-search
branch
from
December 5, 2026 14:50
08adbaf to
e9223dd
Compare
tony
force-pushed
the
concept/snapshot-cell-search
branch
from
December 5, 2026 15:06
e9223dd to
9e06f49
Compare
tony
force-pushed
the
concept/snapshot-cell-search
branch
from
December 5, 2026 15:29
9e06f49 to
7763e7b
Compare
why: String indexing on Snapshot.lines returns code-point offsets instead of display cell columns, so mouse clicks and cell slices miss labels preceded by wide glyphs or multi-codepoint graphemes. what: - Add frozen dataclass libvt.snapshot.CellSpan and Snapshot.find_cells() returning ordered half-open cell spans across complete stored graphemes in the active viewport with explicit str type validation. - Keep CellSpan owned solely in libvt.snapshot with no terminal compatibility re-export. - Add unit, edge-case (wide/grapheme/?2027l/VS16/BCE/cols=1/?2026/CoW), doctest, and real-PTY mouse-click tests in tests/test_terminal.py and tests/test_aio.py. - Document CellSpan and Snapshot.find_cells() in docs/topics/snapshots.md, docs/project/public-api.md, README.md, and CHANGES. Fixes #102
tony
force-pushed
the
concept/snapshot-cell-search
branch
from
December 5, 2026 17:27
7763e7b to
228801e
Compare
tony
marked this pull request as ready for review
December 5, 2026 17:27
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.
Summary
libvt.snapshot.CellSpanandSnapshot.find_cells(text, /)returning ordered, half-open(row, start, stop)display cell spans across complete stored graphemes in the active viewport (including overlapping matches, explicit trailing spaces, and leading blanks, while skipping wrap spacers and unwritten/BCE trailing padding).textexplicitly (TypeErrorfor non-str;ValueErrorfor empty strings or strings containing\r/\n), and keepCellSpanowned solely inlibvt.snapshotwith no compatibility re-export onlibvt.terminal.Examplesdoctests onCellSpanandSnapshot.find_cells, updatedocs/topics/snapshots.md,docs/project/public-api.md,README.md, andCHANGES, and add comprehensive unit, boundary (?2027h/?2027l, VS16/VS15, RI flags,ambiguous_width=2,cols=1,?7l,SPACER_HEAD/SPACER_TAIL, BCE,?2026, CoW), and real-PTY mouse-click tests.Fixes #102