Commit Graph

12437 Commits

Author SHA1 Message Date
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
Nicholas Marriott
c53fd94ffd Fallback image drawing. 2026-10-14 00:08:37 +01:00
Nicholas Marriott
fbbecde236 SIXEL image placement. 2026-10-13 22:43:16 +01:00
Nicholas Marriott
6cebf96d9c SIXEL to image conversion. 2026-10-13 22:11:16 +01:00
Nicholas Marriott
4b06bdd63b Merge master into 4902-image-support 2026-10-13 21:18:26 +01:00
Nicholas Marriott
2c64f131a9 Some more image redraw bits. 2026-10-13 21:05:08 +01:00
Nicholas Marriott
198b0e6933 Merge branch 'image_merge' 2026-10-13 21:02:23 +01:00
tmux update bot
458e04c5e5 Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Add format variables for the cmdline property to OSC 133, GitHub issue 5711.
2026-10-13 15:17:52 +00:00
nicm
baf8960837 Add format variables for the cmdline property to OSC 133, GitHub issue 5711. 2026-10-13 15:17:50 +00:00
tmux update bot
8eb32bb3a7 Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Complete layout names and options again, GitHub issue 5731 from intertermux at gmail dot com.
2026-10-13 10:51:24 +00:00
nicm
9026b1d197 Complete layout names and options again, GitHub issue 5731 from
intertermux at gmail dot com.
2026-10-13 10:51:22 +00:00
Nicholas Marriott
fca791a6f6 OSC 133 cmdline tests. 2026-10-13 11:22:15 +01:00
Nicholas Marriott
80fbab8ae8 Fix test on macOS. 2026-10-13 08:20:29 +01:00
Nicholas Marriott
657fe07a89 Accidentally added this test too before the fix. 2026-10-13 07:13:09 +01:00
tmux update bot
06bc15440b Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Add a flag to mark screen_write_ctx as coming from pane input and change a function argument.
  For tree mode, hold a reference to prompt and other bits across command to avoid crashing when killing the session with the mode's pane. GitHub issue 5728.
2026-10-13 01:00:12 +00:00
nicm
e2eb6b7d87 Add a flag to mark screen_write_ctx as coming from pane input and change
a function argument.
2026-10-13 01:00:11 +00:00
nicm
0985de0bc6 For tree mode, hold a reference to prompt and other bits across command
to avoid crashing when killing the session with the mode's pane. GitHub
issue 5728.
2026-10-13 01:00:11 +00:00
tmux update bot
ae2fb3797c Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Shorten some long lines.
  Use grid_free_line when freeing reflow lines.
2026-10-12 18:35:33 +00:00
nicm
7d01314422 Shorten some long lines. 2026-10-12 18:35:31 +00:00
nicm
d913cf5723 Use grid_free_line when freeing reflow lines. 2026-10-12 18:35:31 +00:00
Nicholas Marriott
9551cdcd67 Add test for killing own session crash. 2026-10-12 19:31:00 +01:00