Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,28 @@ Pass a sliced, reversed, or multidimensional `memoryview` to the parser,
terminal, recorder, explainer, PTY writes, or `tmux` control-mode helpers.
Each reads the logical bytes. Step offsets count those bytes.

#### Keep retained live rows indexable across resizes (#183)

{class}`~libvt.screen.RowView` uses the current width for a live row's
length, indexing, and rendering. Retained slices clip their selected columns
to the current width. Frozen rows keep their captured dimensions.

#### Keep retained live rows and nested regions in bounds (#183)

{class}`~libvt.screen.RowView` uses the current width for a live row's
length, indexing, and rendering. Retained slices clip their selected columns
to the current width. Frozen rows keep their captured dimensions.

{class}`~libvt.screen.RegionView` accepts two-axis nested indexing in its own
coordinates, clipping live regions to their retained rows after a resize and
preserving captured dimensions for snapshot regions. Public read-model
properties now cover {attr}`~libvt.screen.RegionView.columns`,
{attr}`~libvt.screen.RowView.columns`, {attr}`~libvt.screen.RowView.used`,
{attr}`~libvt.screen.RowView.text_used`,
{attr}`~libvt.screen.RowView.full_row`, {attr}`~libvt.screen.Screen.profile`,
{attr}`~libvt.screen.Screen.is_alt`, and
{attr}`~libvt.terminal.Snapshot.profile`.

### Documentation

#### Assert effective colors alongside screen goldens (#190)
Expand Down
22 changes: 22 additions & 0 deletions docs/topics/snapshots.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,28 @@ styles:
r0[0..2]: bold fg=green
```

### Crop a region again

A region accepts the same row and column indices as its source. Nested indices
are relative to the crop. Read `columns` to locate it in the source grid. A
live region clips to its retained rows after a resize. A snapshot region keeps
its captured dimensions.

```python
>>> from libvt import Terminal
>>> term = Terminal(rows=2, cols=6)
>>> term.feed(b"ABCDEF\r\nghijkl")
>>> outer = term.committed[:, 1:5]
>>> inner = outer[:, 1:-1]
>>> inner.display_lines, inner.columns
(('CD', 'ij'), range(2, 4))
>>> inner[0].full_row.text
'ABCDEF'
```

A row's `used` extent includes written background-only cells. Its `text_used`
extent ends with the text. Both are measured from the start of the row view.

## Stateless scrollback paging (`viewport()`)

Primary-screen snapshots retain frozen scrollback alongside the active
Expand Down
Loading
Loading