From 70e035f59c93d5afb5c8200810ef63b15017416c Mon Sep 17 00:00:00 2001 From: Mort Yao Date: Fri, 20 Oct 2023 02:31:38 +0200 Subject: [PATCH] vte>=0.57.3 supports BiDi (fix #464) --- include/Main.awk | 4 ++-- include/Utils.awk | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/Main.awk b/include/Main.awk index c85bd772..69a06139 100644 --- a/include/Main.awk +++ b/include/Main.awk @@ -139,8 +139,8 @@ function initMisc( command, group, temp) { if (Option["no-bidi"] || BiDiTerm == "mlterm") # mlterm implements its own padding BiDi = BiDiNoPad = NULLSTR - else if (!Option["force-bidi"] && BiDiTerm == "konsole") { - # konsole implements no padding; we should handle this + else if (!Option["force-bidi"] && (BiDiTerm == "vte" || BiDiTerm == "konsole")) { + # vte & konsole implement no padding; we should handle this BiDiNoPad = NULLSTR BiDi = "sed \"s/'/\\\\\\'/\" | xargs -0 printf '%%%ss'" } diff --git a/include/Utils.awk b/include/Utils.awk index 9a30e6f9..0ea2ee79 100644 --- a/include/Utils.awk +++ b/include/Utils.awk @@ -23,6 +23,9 @@ function initBiDiTerm() { BiDiTerm = "mlterm" else if (ENVIRON["KONSOLE_VERSION"]) BiDiTerm = "konsole" + else if (ENVIRON["VTE_VERSION"]) + if (int(ENVIRON["VTE_VERSION"]) >= 5703) + BiDiTerm = "vte" } # Detect external bidirectional algorithm utility (fribidi);