Default each Kitty source-rectangle key on its own #123

Merged
natsukium merged 1 commit from fix/partial-source into main 2026-10-12 18:06:39 +09:00
Owner

A placement's x/y/w/h took effect only when all four were given. kitty's handle_put_command defaults each key on its own (x/y to 0, an absent or zero w/h to the image size) and clips to the image; the daemon now resolves the rectangle the same way, so a=p,i=1,x=40 on a 100 px image draws the right 60 px.

Closes #43

A placement's `x`/`y`/`w`/`h` took effect only when all four were given. kitty's `handle_put_command` defaults each key on its own (`x`/`y` to 0, an absent or zero `w`/`h` to the image size) and clips to the image; the daemon now resolves the rectangle the same way, so `a=p,i=1,x=40` on a 100 px image draws the right 60 px. Closes #43
daemon: default each Kitty source-rectangle key on its own
All checks were successful
darwin / detect relevant changes (pull_request) Successful in 8s
darwin / darwin docs-only no-op (pull_request) Has been skipped
darwin / build felis (aarch64-darwin) (pull_request) Successful in 1m9s
windows / detect relevant changes (pull_request) Successful in 20s
windows / windows docs-only no-op (pull_request) Has been skipped
windows / cargo nextest (Windows) (pull_request) Successful in 6m13s
windows / frontend smoke (Windows) (pull_request) Successful in 1m14s
bench / instruction-count regression gate (pull_request) Successful in 44s
pr / nix flake check (pull_request) Successful in 38s
pr / cargo build / clippy / test / deny (pull_request) Successful in 2m22s
pr / wire schema is compatible with the base (pull_request) Successful in 2s
pr / frontend smoke (x86_64-linux) (pull_request) Successful in 29s
windows / cargo clippy (Windows cross) (pull_request) Successful in 15s
d79c95f5a9
A placement's x/y/w/h took effect only when all four were given, so a
producer that sent x=40 alone to skip the left of an image got the
whole image. kitty's handle_put_command defaults each key separately:
x and y to 0, an absent or zero w or h to the image's size, and then
clips to what is left past x and y. The daemon now resolves the
rectangle the same way against the image it places, so the stored and
announced rectangle, the natural extent and the cursor move all follow
from the cropped region; clip_source already did the clipping.

Closes #43

Assisted-by: Claude Code
natsukium scheduled this pull request to auto merge when all checks succeed 2026-10-12 16:45:14 +09:00
natsukium deleted branch fix/partial-source 2026-10-12 18:06:39 +09:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
felis-terminal/felis!123
No description provided.