`Screen::parse` refuses text snapshots that 0.11.1 and 0.11.6 wrote
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- rust
- Domain
- testing-qa
Research direction
Start with screen/parse.rs around parse_header and lay_out_row, then compare the cursor handling in serde_impl.rs and the JSON row reader. Add both reported snapshots to tests/compat/ and verify they parse; done means the pending-wrap and stranded-wide-character files are accepted, including the JSON-to-text round trip.
Written by the indexing model from the issue text.
Description
What happens. Two shapes that earlier releases wrote no longer parse. The files below were written by the published crates, with the probe's lockfile resolving termlens 0.11.1 and 0.11.6 from crates.io:
- The pending-wrap cursor (0.11.1). After a write filled the last column, releases up to 0.11.1 wrote the cursor one past it.
printf '\r\nabcdef'on 6x2 producedsize: 6x2 cursor: 1,6.
Reading that file with 0.11.7:line 1: cursor 1,6 is outside the 6x2 grid, andtermlens renderexits 2. - A wide character stranded by a narrowing resize (0.11.6). On vt100 0.16,
printf 'abcd東xy\r\nABC東'on 8x3 followed byresize(5, 3)left東wide in the last column, with no continuation cell. That is the truncation case DESIGN §3 describes.
Reading the text save with 0.11.7:line 2: the row is wider than the 5 columns the header declares.
The JSON reader accepts both shapes: #375 handled the cursor, and check_row the stranded character. So the JSON twin of the second file reads, but its own with_styles() output then fails to parse again (JSON → text → parse).
The claim. docs/STABILITY.md: "A file written by any release from 0.10.1 on parses in every later release and renders back byte for byte."
Cause. screen/parse.rs:160 bounds the cursor at cols - 1. parse.rs:249 refuses a row whose wide character's second column falls one past the edge.
Fix.
- In
parse_header, clampc == colsontocols - 1, asserde_impl.rs:162does. - In
lay_out_row, accept a wide character whose second column is exactly one past the edge, marked wide with no continuation cell, as the JSON reader allows.
Done when both files read, with a pending-wrap file and a stranded-wide-character file added to tests/compat/. The corpus missed both shapes.
- Dominant language
- Rust
- Stars
- 28
- Forks
- 24
- Avg merge
- 11h 23m
- Merged PRs (30d)
- 42
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from vyncint/termlens
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
Maintainers usually reply within 1 day
-
Release notes show a broken link: `extract-changelog.sh` copies a reference but not its definitionOpenbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
All issues in vyncint/termlens
Similar issues
-
色変記事を追加Openpriority middle
Difficulty 1/5 Under an hour Newbie friendliness 62/100
KATO-Hiro/AtCoderClans#12955 ·
Maintainers usually reply within 1 day
-
auto:doc-drift auto:producer
Difficulty 2/5 1-3 hours Newbie friendliness 60/100
fritzprix/libr-agent#2458 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
yantrikos/yantrik-os#1048 ·
Maintainers usually reply within 1 day
-
rust
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
vllm-project/vllm#64939 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 4 days