diff options
author | Robin Jarry <robin@jarry.cc> | 2023-08-24 11:33:21 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-08-24 14:01:52 +0200 |
commit | 606f8f0c701d349c8c1ff061587560cb46c0ba85 (patch) | |
tree | 15cd75a2904059d7fcd2941274ef03b852991646 /widgets/msgviewer.go | |
parent | a5d6a70f440f770b41dc345324fa7413b3745e3f (diff) | |
download | aerc-606f8f0c701d349c8c1ff061587560cb46c0ba85.tar.gz |
colorize: only emit osc8 if [general].enable-osc8=true
Some old versions of less do not handle OSC 8 escape sequences. Even if
aerc's embedded terminal is configured to handle them, less corrupts
them making the output unreadable.
8;id=colorize-1;https://foobar.com/stuff/https://foobar.com/stuff/
When [general].enable-osc8 is set to false (its default value) do not
attempt to generate OSC 8 sequences with the built-in colorize filter.
These sequences would be stripped out anyway.
Reported-by: Omar Polo <op@omarpolo.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Kirill Chibisov <contact@kchibisov.com>
Diffstat (limited to 'widgets/msgviewer.go')
-rw-r--r-- | widgets/msgviewer.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go index d1bee8c6..0908417d 100644 --- a/widgets/msgviewer.go +++ b/widgets/msgviewer.go @@ -620,6 +620,9 @@ func NewPartViewer( format.FormatAddresses(info.Envelope.From))) filter.Env = append(filter.Env, fmt.Sprintf("AERC_STYLESET=%s", acct.UiConfig().StyleSetPath())) + if config.General.EnableOSC8 { + filter.Env = append(filter.Env, "AERC_OSC8_URLS=1") + } log.Debugf("<%s> part=%v %s: %v | %v", info.Envelope.MessageId, curindex, mime, filter, pager) if pagerin, err = pager.StdinPipe(); err != nil { |