mage reference. Deferred pane redraws explain the intermittent “image never appears” behavior.
Fixed:
- Preserves image metadata while updating the text underlay in the collected ASCII path: grid.c:779
- Handles the single-cell/non-ASCII path and schedules an image redraw: screen-write.c:2631
- Uses the requested if/else for new_id.
- Adds a deterministic regression reproducing point (2): regress/image-support.sh:240
This matches Kitty’s requirement that normal text operations must not affect graphics; graphics require
explicit deletion. Kitty graphics protocol
Build an adaptive 256-colour palette with median cut instead of using a fixed colour cube. Apply Floyd-Steinberg error diffusion while mapping pixels to reduce banding and preserve image detail.
Retain the padded canonical pixel canvas separately from the image content. Scale only the populated portion of partial edge cells so an image keeps its exact raster size on the originating terminal while retaining its cell footprint.
A resize may temporarily leave the terminal cell pixel dimensions unknown while tmux queries the terminal. Schedule another client redraw when the pixel geometry response arrives so the graphical backend replaces the temporary text fallback.
Enable the sixel feature when WezTerm is detected and clarify that the kitty terminal feature requires Unicode placeholder support rather than only the basic graphics protocol.
Two more fixes based on Michael K. Darling's branch
(github.com/darlingm/tmux, pr5516-regression-fixes), taken as-is -
neither is caught by any test in regress/ yet, found by code review
rather than a failing test:
- screen_write_redraw_cb() (screen-write.c) reported damage for only a
single row, using ttyctx->ocy as if every fallback redraw were a
single-cell write. But it's also the callback for cases that can
legitimately span many rows - a large scroll-region fallback
(tty_redraw_region(), when tty_large_region() or the pane is
obscured), a full reset, and entering/leaving the alternate screen.
For those, only the top row of the affected area ever got marked as
damaged, leaving the rest stale until an unrelated redraw happened to
cover it. Changed the shared tty_ctx_redraw_cb typedef to carry
(py, ny) - the actual row range - and updated every call site to pass
the range it actually knows about, instead of hardcoding a single
row.
- window_pane_redraw_floating() (window.c) never refreshed the status
line after moving/resizing a floating pane, so a status format
depending on that pane's geometry (e.g. #{pane_width}) could go
stale until an unrelated status refresh happened. Added a
server_status_window(w) call.
Also confirmed the window_pane_scrollbar_intersects() parameter
naming cleanup (loop -> wp) discussed earlier was already done in an
earlier "Cleanup." commit - nothing left to do there.
All 9 tests in regress/ plus the two pre-existing floating-pane tests
plus a further 19-test sweep of redraw/tty/input/sync-adjacent
regress tests pass.
Co-Authored-By: Michael K. Darling <darlingm@gmail.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>