Commit Graph

12457 Commits

Author SHA1 Message Date
Nicholas Marriott
e5147c2bbc Merge origin/4902-image-support into 4902-image-support
Keep the global SIXEL cache and retention removal while incorporating the Escape-termination revert. Remove the manual-size comment in resize.c.
2026-10-14 15:43:21 +01:00
Nicholas Marriott
8c00d168f3 Merge image_merge into 4902-image-support
Replace SIXEL retention and the per-client cache with the global indexed-image cache from image_merge. Adapt its backend callbacks for Kitty and test palette quantization through both input protocols.
2026-10-14 15:39:59 +01:00
Nicholas Marriott
5213cbf644 Add SIXEL cache. 2026-10-14 15:31:25 +01:00
Nicholas Marriott
77449c0e5c Remove some code that will not be needed. 2026-10-14 15:12:45 +01:00
Michael Grant
b018c5a3b7 Revert "End a SIXEL string at an Escape that is not followed by a backslash." This reverts commit 7b45ee638. 2026-10-14 16:03:04 +02:00
Nicholas Marriott
76d50125ac Delete pane status redraw bit which we think is not needed now. 2026-10-14 14:57:45 +01:00
Nicholas Marriott
0659362e57 Merge image_merge into 4902-image-support 2026-10-14 14:42:47 +01:00
Nicholas Marriott
c642ad8804 Merge master into image_merge 2026-10-14 14:39:57 +01:00
Nicholas Marriott
3a2b9ae5be Do not set zero bits and add features. 2026-10-14 14:36:43 +01:00
Nicholas Marriott
b1d0bf878b Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Add a temporary var.
  Track window scrolling for damage.
  Add flags to damage struct.
  Add imagescroll feature and capability.
  Only redraw when a feature changed.
2026-10-14 14:35:27 +01:00
nicm
6dfed2fec0 Add a temporary var. 2026-10-14 14:34:54 +01:00
nicm
e69cdbefef Track window scrolling for damage. 2026-10-14 14:34:51 +01:00
nicm
d1a68c1347 Add flags to damage struct. 2026-10-14 14:34:30 +01:00
nicm
ff12520ec0 Add imagescroll feature and capability. 2026-10-14 14:34:30 +01:00
nicm
fbde17083d Only redraw when a feature changed. 2026-10-14 14:34:27 +01:00
nicm
06262fbb48 Add a temporary var. 2026-10-14 13:31:35 +00:00
nicm
3e6c6576ab Track window scrolling for damage. 2026-10-14 13:31:35 +00:00
nicm
abbe04fb74 Add flags to damage struct. 2026-10-14 13:31:35 +00:00
nicm
3ba4fb32cf Add imagescroll feature and capability. 2026-10-14 13:31:35 +00:00
nicm
6b26f0abc0 Only redraw when a feature changed. 2026-10-14 13:31:35 +00:00
Michael Grant
7b45ee638b End a SIXEL string at an Escape that is not followed by a backslash.
An unterminated SIXEL image kept the pane in the DCS state, so everything
the program printed afterwards was swallowed until the timeout, and the image
itself was never drawn. Treat the Escape as the end of the image, as other
terminals do, and handle the sequence after it normally. Other DCS strings
are unchanged.
2026-10-14 15:29:49 +02:00
Nicholas Marriott
8856c1e669 Merge image_merge into 4902-image-support
Keep retained indexed SIXEL data and the bounded per-terminal output cache.
Use the cleaned-up decoder and RGBA encoder from image_merge, including
parser memory limits, pixel-size handling and references for pending output.
Match retained SIXEL scaling to the shared image cell footprint and emit
black definitions for undefined colour registers.

Keep Kitty input, output, layers and placeholders. Adapt backend selection,
flags, drawing and cleanup to the callbacks and Iscrl capability. Keep the
pane-status repaint with the requested XXX comment.

Replace the elaborate fallback with image_merge's implementation, removing
its caches, sample structures, quadrant/sextant features and ACS additions.
Keep the image_merge regressions and adapt the Kitty tests to the simpler
fallback. Use skip status 101 and disable Python bytecode for image tests.

Small changes still outside image_merge:
- Guard zero-height synchronized redraws before bit_nset.
- Select the image backend when the tty opens.
- Enable imagescroll by default for Kitty and Ghostty.
- Keep the explanatory manual-window pixel-size comment (comment only).
- Keep the additional SIXEL fixtures and visual test tools.

Validation: image-enabled and disabled builds; 31 image and 13 related
regressions pass normally and under ASAN. All image tests skip without
images. Focused palette, parser, scaling, transparency and Kitty layer
tests also pass after the retained-output adjustments. Diff checks clean.
2026-10-14 14:28:22 +01:00
Nicholas Marriott
1ce50ef13a Merge master into image_merge 2026-10-14 14:08:01 +01:00
Nicholas Marriott
e40cbf4ee8 Update sizes on WINSZ. 2026-10-14 14:03:54 +01:00
Nicholas Marriott
d4d065c76c Use imagescroll feature. 2026-10-14 13:55:06 +01:00
Nicholas Marriott
d78914317c Track window scrolling for damage. 2026-10-14 13:47:12 +01:00
Nicholas Marriott
cae2f4319e Add flags to damage struct. 2026-10-14 13:38:23 +01:00
Nicholas Marriott
954ad1df9d Add imagescroll feature and capability. 2026-10-14 13:32:49 +01:00
tmux update bot
e5b3eb0ca1 Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Do redraw as two phases for text and images.
2026-10-14 12:32:29 +00:00
nicm
93e55bb86d Do redraw as two phases for text and images. 2026-10-14 12:32:27 +00:00
Michael Grant
8576309fb6 Add sixel test images 2026-10-14 14:17:54 +02:00
Michael Grant
82d8c67504 Recalculate window sizes when the terminal reports its pixel size.
The reply to CSI 14t updated the client's cell size but not the windows,
which kept the default 16x32 cell size until some other event (a resize, or
any client connecting or exiting) triggered recalculate_sizes(). Images
parsed in the meantime were sized for the wrong cell and drawn at the wrong
size. Recalculate when the reply arrives, and extend the reply test to check
that the window follows the client without any other event.
2026-10-14 14:11:55 +02:00
Nicholas Marriott
7fc663ee0d Add a test. 2026-10-14 12:59:42 +01:00
Nicholas Marriott
69cffb88b6 Only redraw when features changed. 2026-10-14 12:55:37 +01:00
Nicholas Marriott
1de5f662cb Image regress tests. 2026-10-14 12:44:53 +01:00
Nicholas Marriott
b17d3da7cd Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Redraw when pixel sizes change.
2026-10-14 12:09:49 +01:00
nicm
a5d7247602 Redraw when pixel sizes change. 2026-10-14 12:06:44 +01:00
nicm
126dea8828 Redraw when pixel sizes change. 2026-10-14 11:02:09 +00:00
Nicholas Marriott
1e294b175f SIXEL draw bits. 2026-10-14 11:40:55 +01:00
Nicholas Marriott
464f404b85 Two phases for redraw. 2026-10-14 11:33:16 +01:00
Nicholas Marriott
5ad552a55c Put #error back. 2026-10-14 11:29:50 +01:00
Nicholas Marriott
d68e56f130 Some of SIXEL output path. 2026-10-14 11:04:00 +01:00
Michael Grant
7e4dc561ca Ignore stray characters in SIXEL data instead of discarding the image. Regression test included. 2026-10-14 11:44:44 +02:00
Nicholas Marriott
9a37890133 Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Fix some long lines.
  Restructure a little bit of code.
2026-10-14 09:34:47 +01:00
Nicholas Marriott
8add11f40a SIXEL from image code. 2026-10-14 09:06:10 +01:00
nicm
61b695097e Fix some long lines. 2026-10-14 04:59:04 +00:00
nicm
e33c83c6ba Restructure a little bit of code. 2026-10-14 00:12:10 +00:00
Nicholas Marriott
f0a2ed3001 Fix some errors from merge. 2026-10-14 00:44:29 +01:00
Nicholas Marriott
17ecceb153 Image resizing code. 2026-10-14 00:30:44 +01:00
Nicholas Marriott
e501ea12c7 Images and copy mode. 2026-10-14 00:23:36 +01:00