A kitty `a=p` placement takes its size from an older transmission when the newest one has none
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Read emu/vt100.rs around line 164 and the placement tests added for issue #588. Trace how placement selects a transmission's size, then add a regression test using the two transmissions in the repro. Done when the placement leaves the cursor in place for the PNG transmission and the test passes.
Written by the indexing model from the issue text.
Description
What happens. With Graphics::Kitty declared and an 8x16 cell size, an image id is transmitted twice: first as a 16x32 RGB image, then as a PNG (whose size termlens cannot know). A later a=p,i=1 moves the cursor by the first image's 2x2 cells:
\e_Ga=t,f=24,s=16,v=32,i=1;AAAA\e\\ \e_Ga=t,f=100,i=1;iVBORw0KGgo=\e\\ \e_Ga=p,i=1\e\\X
The X lands at (1,2). With the PNG alone, nothing moves (X at (0,0)), which is what docs/LIMITATIONS.md documents.
Cause. emu/vt100.rs:164 looks up the size with rev().find_map(|e| (matches).then(|| e.size()).flatten()). When the newest transmission with the id has no size, find_map skips it and keeps searching.
Fix. Find the newest transmission with the id, then take its size: .rev().find(|e| e.protocol() == Kitty && e.id() == Some(id)).and_then(GraphicsPayload::size).
Done when the repro leaves the cursor in place, with a test beside the #588 placement tests.
- 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
-
good first issue help wanted r-docs
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
servo/rust-smallvec#824 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
priority middle
Difficulty 1/5 Under an hour Newbie friendliness 62/100
KATO-Hiro/AtCoderClans#12940 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
o8 next debug build aborts on Glass to Dark appearance switch (nil identifier messaged before check)Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
hurttlocker/o8#5112 ·