A new option to control when hyperlinks are underlined

While kitty is never going to underline detected URLs as the performance
of that is absurd, underlining hyperlinks specifically is acceptable,
since they dont require detection.

See #6766
This commit is contained in:
Kovid Goyal
2023-11-03 08:51:58 +05:30
parent 954b7f87a5
commit b4f88b4f81
10 changed files with 65 additions and 7 deletions

View File

@@ -22,6 +22,7 @@ typedef struct {
} UrlPrefix;
typedef enum AdjustmentUnit { POINT = 0, PERCENT = 1, PIXEL = 2 } AdjustmentUnit;
typedef enum UnderlineHyperlinks { UNDERLINE_ON_HOVER = 0, UNDERLINE_ALWAYS = 1, UNDERLINE_NEVER = 2 } UnderlineHyperlinks;
struct MenuItem {
const char* *location;
@@ -95,6 +96,7 @@ typedef struct {
float val; AdjustmentUnit unit;
} underline_position, underline_thickness, strikethrough_position, strikethrough_thickness, cell_width, cell_height, baseline;
bool show_hyperlink_targets;
UnderlineHyperlinks underline_hyperlinks;
int background_blur;
long macos_titlebar_color;
unsigned long wayland_titlebar_color;