From f76e9d29cef5815749f83953c0bb5ffc4c8c4870 Mon Sep 17 00:00:00 2001 From: Michael Grant Date: Thu, 6 Aug 2026 14:27:07 +0100 Subject: [PATCH] Use one image support switch --- configure.ac | 1 - input.c | 8 ++++---- screen-write.c | 2 +- tmux.h | 8 ++++---- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index 91778d752..3c10baaac 100644 --- a/configure.ac +++ b/configure.ac @@ -546,7 +546,6 @@ if test "x$enable_sixel" = xyes; then fi if test "x$with_image_support" = xyes; then AC_DEFINE(ENABLE_IMAGES) - AC_DEFINE(ENABLE_SIXEL) fi AM_CONDITIONAL(ENABLE_IMAGES, [test "x$with_image_support" = xyes]) diff --git a/input.c b/input.c index 8f58d9bc7..fca13f61b 100644 --- a/input.c +++ b/input.c @@ -1583,7 +1583,7 @@ input_csi_dispatch(struct input_ctx *ictx) case -1: break; case 0: -#ifdef ENABLE_SIXEL +#ifdef ENABLE_IMAGES input_reply(ictx, 1, "\033[?1;2;4c"); #else input_reply(ictx, 1, "\033[?1;2c"); @@ -2101,7 +2101,7 @@ input_csi_dispatch_sm_private(struct input_ctx *ictx) static void input_csi_dispatch_sm_graphics(__unused struct input_ctx *ictx) { -#ifdef ENABLE_SIXEL +#ifdef ENABLE_IMAGES int n, m, o; if (ictx->param_list_len > 3) @@ -2626,7 +2626,7 @@ input_dcs_dispatch(struct input_ctx *ictx) const char prefix[] = "tmux;"; const u_int prefixlen = (sizeof prefix) - 1; long long allow_passthrough = 0; -#ifdef ENABLE_SIXEL +#ifdef ENABLE_IMAGES struct window *w; struct sixel_image *si; int p2; @@ -2642,7 +2642,7 @@ input_dcs_dispatch(struct input_ctx *ictx) return (0); } -#ifdef ENABLE_SIXEL +#ifdef ENABLE_IMAGES if (wp != NULL && buf[0] == 'q' && ictx->interm_len == 0) { w = wp->window; if (input_split(ictx) != 0) diff --git a/screen-write.c b/screen-write.c index 17d3a4752..ea2d1fb8f 100644 --- a/screen-write.c +++ b/screen-write.c @@ -3020,7 +3020,7 @@ screen_write_rawstring(struct screen_write_ctx *ctx, u_char *str, u_int len, tty_write(tty_cmd_rawstring, &ttyctx); } -#ifdef ENABLE_SIXEL +#ifdef ENABLE_IMAGES /* Write a SIXEL image. */ void screen_write_sixelimage(struct screen_write_ctx *ctx, struct sixel_image *si, diff --git a/tmux.h b/tmux.h index 5d15d0c0d..4f5a6eccc 100644 --- a/tmux.h +++ b/tmux.h @@ -81,7 +81,7 @@ struct image_backend; struct image_fallback_data; struct image_rectangle; #endif -#ifdef ENABLE_SIXEL +#ifdef ENABLE_IMAGES struct sixel_image; #endif @@ -1894,7 +1894,7 @@ struct tty_ctx { size_t size; } sel; -#ifdef ENABLE_SIXEL +#ifdef ENABLE_IMAGES struct image *image; #endif }; @@ -3653,7 +3653,7 @@ void screen_write_setselection(struct screen_write_ctx *, const char *, u_char *, u_int); void screen_write_rawstring(struct screen_write_ctx *, u_char *, u_int, int); -#ifdef ENABLE_SIXEL +#ifdef ENABLE_IMAGES void screen_write_sixelimage(struct screen_write_ctx *, struct sixel_image *, u_int); #endif @@ -4283,7 +4283,7 @@ void image_rectangle_get_coordinates(const struct image_rectangle *, u_int *, u_int *, u_int *, u_int *, u_int *, u_int *); #endif -#ifdef ENABLE_SIXEL +#ifdef ENABLE_IMAGES /* image-sixel.c */ #define SIXEL_COLOUR_REGISTERS 1024 void sixel_draw_rectangle(struct tty *,