pager: stop disabling urlification under a pager
Less 568 properly shows urlified strings. Putative NEWS entry: * Urlification is now enabled by default even when a pager is used. Previously it was disabled, because less would not show such markup properly. This has been fixed in less 568. Please either upgrade less, or use SYSTEMD_URLIFY=0 to disable the feature.
This commit is contained in:
parent
0a67dd8310
commit
ebef02dd8f
|
@ -21,10 +21,6 @@
|
||||||
bool urlify_enabled(void) {
|
bool urlify_enabled(void) {
|
||||||
static int cached_urlify_enabled = -1;
|
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) {
|
if (cached_urlify_enabled < 0) {
|
||||||
int val;
|
int val;
|
||||||
|
|
||||||
|
@ -32,7 +28,7 @@ bool urlify_enabled(void) {
|
||||||
if (val >= 0)
|
if (val >= 0)
|
||||||
cached_urlify_enabled = val;
|
cached_urlify_enabled = val;
|
||||||
else
|
else
|
||||||
cached_urlify_enabled = colors_enabled() && !pager_have();
|
cached_urlify_enabled = colors_enabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
return cached_urlify_enabled;
|
return cached_urlify_enabled;
|
||||||
|
|
Loading…
Reference in New Issue