Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Sixel decode crops to the declared raster size; xterm keeps what was painted

Open Beginner friendly
#638 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
cli, testing

Research direction

Read graphics.rs around lines 824–826 and the cursor-placement logic around line 1149, then find the existing sixel decoder tests. Update decoding so each axis uses the greater of the declared and painted extent, within the 4096 cap. Done when the repro decodes to 8×12 and a test covers it.

Written by the indexing model from the issue text.

Description

bug good first issue

What happens. A sixel declaring 2x6 px ("1;1;2;6) that paints 8x12 decodes as 2x6:

\033Pq"1;1;2;6#0;2;100;0;0~~~~~~~~-~~~~~~~~\033\\
size() == Some((2, 6)); decoded 2x6; pixel(5,0) == None; pixel(0,8) == None

xterm's image is 8x12, with those pixels red. xterm-sixel.c sets the actual width and height to max(declared, painted), and set_sixel grows the image to the painted extent.

Cause. graphics.rs:824-826. The decoder's own comment says a sixel "can still overrun" its declared size, and the cursor-placement code already uses the maximum (:1149).

Fix. Decode to max(declared, painted) on each axis, still under the 4096 cap.

Done when the repro decodes 8x12, with a test.

Dominant language
Rust
Stars
28
Forks
24
Avg merge
11h 23m
Merged PRs (30d)
42

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vyncint/termlens

All issues in vyncint/termlens

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.