mirror of
https://github.com/tmux/tmux.git
synced 2026-10-15 07:44:24 +00:00
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.
This commit is contained in:
@@ -26,6 +26,25 @@
|
||||
|
||||
#include "tmux.h"
|
||||
|
||||
/* Return whether the terminal supports Kitty graphics. */
|
||||
int
|
||||
kitty_select(struct tty *tty)
|
||||
{
|
||||
return (tty->term != NULL &&
|
||||
(tty->term->flags & TERM_KITTYGRAPHICS));
|
||||
}
|
||||
|
||||
/* Get Kitty backend flags. */
|
||||
int
|
||||
kitty_get_flags(struct tty *tty)
|
||||
{
|
||||
int flags = IMAGE_BACKEND_GRAPHICAL|IMAGE_BACKEND_CLIPPED;
|
||||
|
||||
if (tty_term_flag(tty->term, TTYC_ISCRL))
|
||||
flags |= IMAGE_BACKEND_SCROLLS;
|
||||
return (flags);
|
||||
}
|
||||
|
||||
#define KITTY_CHUNK_SIZE 3072
|
||||
|
||||
static const uint32_t kitty_diacritics[] = {
|
||||
|
||||
Reference in New Issue
Block a user