From d75278e6f3800333490c896c959a918221354d1d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerd=20M=C3=B6llmann?= Date: Fri, 7 Mar 2025 09:35:20 +0100 Subject: [PATCH] Fix tty underline capability check (bug#75024) * src/dispextern.h (TTY_CAP_UNDERLINE_STYLED): Fix. Also make this an enum. (cherry picked from commit 9277b037938b79e13a26c30ec0d2be30cfafd32b) --- src/dispextern.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/dispextern.h b/src/dispextern.h index 1b383164752..bd48005b83f 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3482,13 +3482,16 @@ enum tool_bar_item_image capabilities being queried for when calling `tty_capable_p' (which returns true if the terminal supports all of them). */ -#define TTY_CAP_INVERSE 0x01 -#define TTY_CAP_UNDERLINE 0x02 -#define TTY_CAP_BOLD 0x04 -#define TTY_CAP_DIM 0x08 -#define TTY_CAP_ITALIC 0x10 -#define TTY_CAP_STRIKE_THROUGH 0x20 -#define TTY_CAP_UNDERLINE_STYLED (0x32 & TTY_CAP_UNDERLINE) +enum +{ + TTY_CAP_INVERSE = 1 << 1, + TTY_CAP_UNDERLINE = 1 << 2, + TTY_CAP_BOLD = 1 << 3, + TTY_CAP_DIM = 1 << 4, + TTY_CAP_ITALIC = 1 << 5, + TTY_CAP_STRIKE_THROUGH = 1 << 6, + TTY_CAP_UNDERLINE_STYLED = 1 << 7 +}; /*********************************************************************** -- 2.39.5