Bug 511435 - OSC 8 hyperlinks in alternate screen buffer affect regular screen buffer
Summary: OSC 8 hyperlinks in alternate screen buffer affect regular screen buffer
Status: REPORTED
Alias: None
Product: konsole
Classification: Applications
Component: general (other bugs)
Version First Reported In: 25.08.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-31 17:15 UTC by Flupp
Modified: 2025-10-31 17:15 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Flupp 2025-10-31 17:15:46 UTC
SUMMARY

When OSC 8 hyperlink support is enabled and an OSC 8 hyperlink appears in the alternate screen buffer, when returning to the regular screen buffer, Konsole indicates a spurious link. This only happens when the regular screen buffer is less than a screen page long (i.e., does not require scrolling yet).


STEPS TO REPRODUCE

0. In the used Konsole profile, enable Mouse/Miscellaneous/“Allow escape sequences for links” and allow the http:// link format.

1. Start with a fresh Konsole tab. There shall not be any scrollback. Make sure that the window is large enough such that the output of the following commands fits the window without scrolling.

2. execute
> printf 'line 1\nline 2\nline 3: \e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'

3. “This is a link” works as expected as a link.

4. execute
> printf 'line 4\nline 5\n\033[?1049h\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n\033[?1049lline 6\nline 7\n'
   Beetween printing some lines, this enables the alternate screen buffer, prints an OSC-8-marked-up hyperlink, and disables the alternate screen buffer again.

   Alternatively, you can use `less` to do the screen buffer switching. After exiting less, the effect will be the same:
> printf 'line 4\nline 5\n'; printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n' | less -R; printf 'line 6\nline 7\n'


OBSERVED RESULT

“line 5” and everything above is now identified as link and clickable via Ctrl+Click. When ctrl-clicking, the error “Malformed URL” is shown. This includes the previously working “This is a link” link.


EXPECTED RESULT

The hyperlinks in the regular screen buffer do not change with step 4.


SOFTWARE/OS VERSIONS

Konsole Version: 25.08.2-1
Operating System: Arch Linux 
KDE Plasma Version: 6.5.1
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
Kernel Version: 6.17.5-arch1-1 (64-bit)
Graphics Platform: Wayland