From: Balint Reczey Date: Sat, 3 Apr 2021 11:23:28 +0000 (+0200) Subject: Revert "pager: stop disabling urlification under a pager" X-Git-Tag: archive/raspbian/249.5-2+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c259e5e10a946ea0a86cca806b416df843418416;p=systemd.git Revert "pager: stop disabling urlification under a pager" Debian and Ubuntu does not yet have a less version that supports urlification https://github.com/systemd/systemd/issues/18814 This patch can be dropped when less 563 or later enters the archive This reverts commit ebef02dd8f35f8b6ee58060b71b7f321a5027760. Gbp-Pq: Topic debian Gbp-Pq: Name Revert-pager-stop-disabling-urlification-under-a-pager.patch --- diff --git a/src/shared/pretty-print.c b/src/shared/pretty-print.c index 137ba77b..b8aeb140 100644 --- a/src/shared/pretty-print.c +++ b/src/shared/pretty-print.c @@ -21,6 +21,10 @@ bool urlify_enabled(void) { static int cached_urlify_enabled = -1; + /* Unfortunately 'less' doesn't support links like this yet 😭, hence let's disable this as long as there's a + * pager in effect. Let's drop this check as soon as less got fixed a and enough time passed so that it's safe + * to assume that a link-enabled 'less' version has hit most installations. */ + if (cached_urlify_enabled < 0) { int val; @@ -28,7 +32,7 @@ bool urlify_enabled(void) { if (val >= 0) cached_urlify_enabled = val; else - cached_urlify_enabled = colors_enabled(); + cached_urlify_enabled = colors_enabled() && !pager_have(); } return cached_urlify_enabled;