Commit Graph

12028 Commits

Author SHA1 Message Date
Michael Grant
e97c3d697d Redraw SIXEL images before or after text depending on which was placed first in the cell. 2026-08-09 08:32:25 +01:00
Michael Grant
c6a59c29ae The implementation now distinguishes a newly placed image cell from one later overwritten by text. On a SIXEL terminal, damaged cells are omitted from image output; on Kitty they remain ordinary positional placements. 2026-08-08 22:35:10 +01:00
Michael Grant
0ac7289c48 Cleanup. 2026-08-08 22:16:24 +01:00
Michael Grant
7dfd835c3f Update Kitty image names 2026-08-08 10:58:15 +01:00
Michael Grant
bbcccee9fc More cleanup of "histogram" name. 2026-08-08 10:51:33 +01:00
Michael Grant
4819dc34df Shorten image and SIXEL names 2026-08-08 10:51:17 +01:00
Michael Grant
6535274d98 Avoid overflow in image cell size calculation 2026-08-08 10:34:00 +01:00
Michael Grant
9a3b71ac64 Move image cell drawing into image.c 2026-08-08 10:27:31 +01:00
Michael Grant
4c9523c814 Expose image backend flags 2026-08-08 10:22:05 +01:00
Michael Grant
7e6c49b5a5 Do not enable sync for SIXEL 2026-08-08 09:14:07 +01:00
Michael Grant
468259933f Comment sixel_from_image(). 2026-08-07 22:42:22 +01:00
Michael Grant
4380fceb2b Add comments to image functions 2026-08-07 22:16:16 +01:00
Michael Grant
08c237f0cb Preserve text behind transparent Kitty images. 2026-08-07 22:06:09 +01:00
Michael Grant
5d0d6c29b4 Revert "Clear text beneath SIXEL image placements."
This reverts commit 64cea48f91.
2026-08-07 19:14:46 +01:00
Michael Grant
64cea48f91 Clear text beneath SIXEL image placements. 2026-08-07 16:39:28 +01:00
Michael Grant
bc998ede98 Ordinary text writes replaced the entire grid cell, dropping GRID_FLAG_IMAGE and releasing the
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
2026-08-07 16:13:07 +01:00
Michael Grant
5c496c765a Preserve Kitty image crop width after cell rounding. 2026-08-07 16:09:00 +01:00
Michael Grant
3cd6526d46 Fix underlay bookkeeping bug. 2026-08-07 11:34:16 +01:00
Michael Grant
1dacc18ce0 Dither alpha in SIXEL output 2026-08-07 11:21:10 +01:00
Michael Grant
e3f6c1849d Revert "Clear text beneath graphical images"
This reverts commit fb589fd9f9.
2026-08-07 09:27:20 +01:00
Michael Grant
a8dfb979e6 Use compact image references in grid cells 2026-08-06 22:36:46 +01:00
Michael Grant
fb589fd9f9 Clear text beneath graphical images 2026-08-06 22:17:19 +01:00
Michael Grant
945152029d Pass through wrapped Kitty graphics 2026-08-06 19:08:59 +01:00
Michael Grant
8536e26517 Simplify image support terminology 2026-08-06 16:17:25 +01:00
Michael Grant
01d5c9f420 Use one image support switch 2026-08-06 14:27:33 +01:00
Michael Grant
a35871110f Make image types opaque 2026-08-06 12:24:10 +01:00
Michael Grant
cdff709ab3 Inline basic image fallback renderer 2026-08-06 10:25:29 +01:00
Michael Grant
2788616b6f Add bptato's test to the regression test script. 2026-08-06 09:11:45 +01:00
Michael Grant
51f1c0de51 The two Chawan symptoms now have matching fixes:
- Layout corruption: C=1 is respected.
  - Lingering remnants: tmux now tracks Kitty’s (image ID, placement ID) identity, replaces moved placements, and honors
    placement-specific d=i,...,p=... deletion.
2026-08-06 00:06:59 +01:00
Michael Grant
045a25c89a Support Kitty Unicode placeholder image transmission
- Parse Kitty graphics commands wrapped in tmux passthrough sequences.
  - Accept unpadded base64 payloads emitted by icat.
  - Handle chunked transfers whose final chunk omits m.
  - Track virtual image placements.
  - Convert Unicode placeholders into shared image cells for Kitty and SIXEL clients.
  - Add regression coverage for wrapped, chunked, unpadded input.
2026-08-05 23:26:11 +01:00
Michael Grant
abfd8cee51 Fix SIXEL median-cut palette generation 2026-08-05 21:44:25 +01:00
Michael Grant
ccc90ea220 Revert "Removed unconditional Floyd–Steinberg dithering from image-sixel.c:1077. Kitty images now use the adaptive 256-colour median-cut palette with direct nearest-colour mapping."
This reverts commit ab591ae430.
2026-08-05 21:38:28 +01:00
Michael Grant
6cb01394ed Merge remote-tracking branch 'origin/master' into 4902-image-support
# Conflicts:
#	tmux.h
2026-08-05 14:17:14 +01:00
Michael Grant
6b8d581135 Fix kitty image resize issue when the kitty image resized smaller than the image, the image was overflowing lines and banding. 2026-08-05 13:51:07 +01:00
Michael Grant
ab591ae430 Removed unconditional Floyd–Steinberg dithering from image-sixel.c:1077. Kitty images now use the adaptive 256-colour median-cut palette with direct nearest-colour mapping. 2026-08-05 13:22:15 +01:00
tmux update bot
d60dbcf91c Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Ignore Ms if it is invalid (for example no %p1) and report in client mode, GitHub issue 5460.
2026-08-05 11:31:10 +00:00
nicm
bd483a63cf Ignore Ms if it is invalid (for example no %p1) and report in client
mode, GitHub issue 5460.
2026-08-05 11:31:08 +00:00
Michael Grant
d06eb0bc2b C=1 is parsed and stored as an image-placement flag, suppressing cursor movement and scrolling as required by the Kitty protocol. 2026-08-05 11:54:22 +01:00
Michael Grant
2a0e47fef0 Merge branch 'master' into 4902-image-support 2026-08-05 11:10:58 +01:00
tmux update bot
d5dc0ba855 Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Use ACS arrows for tree mode.
  Do not crash when synchronizing groups and there is no current window. GitHub issue 5467 from Ju-an Zhang.
  Add pane_private_modes format with list of DEC private modes, from George Nachman.
  Do not log when logging is off, from Michael Grant.
2026-08-05 09:10:55 +00:00
nicm
e56a042153 Use ACS arrows for tree mode. 2026-08-05 09:10:54 +00:00
nicm
1995b5559d Do not crash when synchronizing groups and there is no current window.
GitHub issue 5467 from Ju-an Zhang.
2026-08-05 09:10:54 +00:00
nicm
fe384e06bc Add pane_private_modes format with list of DEC private modes, from
George Nachman.
2026-08-05 09:10:54 +00:00
nicm
0198ee9e51 Do not log when logging is off, from Michael Grant. 2026-08-05 09:10:54 +00:00
Nicholas Marriott
72e705cbd6 Tweak times for macOS. 2026-08-05 08:26:10 +01:00
tmux update bot
d5afb67a81 Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Switch from imsg_get to imsgbuf_get and switch type of n to int.
2026-08-04 17:23:12 +00:00
claudio
3894397b07 Switch from imsg_get to imsgbuf_get and switch type of n to int.
OK tb@
2026-08-04 17:23:10 +00:00
tmux update bot
36381f0884 Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Do not attempt to drain write buffer on stuck clients, since it requires a weird dance to make libevent do it. Instead, just ignore the client and destroy the buffer normally if not drained in 10 seconds.
2026-08-04 15:37:15 +00:00
nicm
5cd1976a4a Do not attempt to drain write buffer on stuck clients, since it requires
a weird dance to make libevent do it. Instead, just ignore the client
and destroy the buffer normally if not drained in 10 seconds.
2026-08-04 15:37:14 +00:00
Michael Grant
3d07d479db Keep SIXEL palettes across redraw spans 2026-08-04 08:25:34 +01:00