-
Notifications
You must be signed in to change notification settings - Fork 105
Description
Currently, by default, the internal SGR processor on Windows does not identify OSC 8 correctly, and renders incorrect text (shows both the URL and text, etc) on Windows prior to 10.
On windows 10+ it does work:
- With
-Da- OSC 8 does render correctly, as this bypassed the internal SGR processor and goes directly to the terminal. - Without
-Da, the internal SGR processor gives up on any ESC sequence which isn't CSI, and passthrough the rest of the buffer unmodified to the terminal, so it works (because VT is enabled by default on Windows 10+).
Adding OSC-8 support to the internal SGR processor is not impossible, and it might be a good solution, however,
since "less" already knows to parse OSC-8, I was wondering if it could be translated to underline the link text on terminals/setups which can't handle OSC -8.
One such case would be Windows if VT is not enabled or if -Da is not used[*]. Other cases could be controlled by some option to indicate that the terminal doesn't support it (I presume there's no terminfo flag for OSC-8 support?).
I didn't yet look at the code, but wanted to hear your thoughts about this.
[*] including the case where -Da is not enabled, because passthrough-to-the-end-of-the-buffer can include SGR sequences after the OSC-8 - which the internal SGR processor would not track during passthrough, which can result in rendering bugs.