From 6feb9d420bd4de33fa5c5577b11bc7ba6fb1f468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Thu, 16 Jan 2025 09:28:10 +0100 Subject: [PATCH] termdesc: foot has undercurls since 1.18.0 References: * https://codeberg.org/dnkl/foot/src/branch/master/CHANGELOG.md#1-18-0 * https://codeberg.org/dnkl/foot/pulls/1747 --- src/lib/termdesc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/lib/termdesc.c b/src/lib/termdesc.c index 5a09c9801..06b58bf8d 100644 --- a/src/lib/termdesc.c +++ b/src/lib/termdesc.c @@ -792,7 +792,8 @@ apply_vte_heuristics(tinfo* ti, size_t* tablelen, size_t* tableused){ } static const char* -apply_foot_heuristics(tinfo* ti, bool* forcesdm, bool* invertsixel){ +apply_foot_heuristics(tinfo* ti, size_t *tablelen, size_t *tableused, + bool* forcesdm, bool* invertsixel){ ti->caps.sextants = true; ti->caps.quadrants = true; ti->caps.rgb = true; @@ -800,6 +801,11 @@ apply_foot_heuristics(tinfo* ti, bool* forcesdm, bool* invertsixel){ if(compare_versions(ti->termversion, "1.8.2") < 0){ *invertsixel = true; } + if(compare_versions(ti->termversion, "1.18.0") >= 0){ + if(add_smulx_escapes(ti, tablelen, tableused)){ + return NULL; + } + } return "foot"; } @@ -982,7 +988,8 @@ apply_term_heuristics(tinfo* ti, const char* tname, queried_terminals_e qterm, newname = apply_vte_heuristics(ti, tablelen, tableused); break; case TERMINAL_FOOT: - newname = apply_foot_heuristics(ti, forcesdm, invertsixel); + newname = apply_foot_heuristics(ti, tablelen, tableused, + forcesdm, invertsixel); break; case TERMINAL_TMUX: newname = "tmux"; // FIXME what, oh what to do with tmux?