[konsole] [Bug 511435] New: OSC 8 hyperlinks in alternate screen buffer affect regular screen buffer

Flupp <[email protected]> Fri, 31 Oct 2025 17:15:46 +0000
Newsgroups gmane.comp.kde.devel.konsole
Message-ID <[email protected]/>
https://bugs.kde.org/show_bug.cgi?id=3D511435

            Bug ID: 511435
           Summary: OSC 8 hyperlinks in alternate screen buffer affect
                    regular screen buffer
    Classification: Applications
           Product: konsole
      Version First 25.08.2
       Reported In:
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

SUMMARY

When OSC 8 hyperlink support is enabled and an OSC 8 hyperlink appears in t=
he
alternate screen buffer, when returning to the regular screen buffer, Konso=
le
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/=E2=80=9CAllow e=
scape
sequences for links=E2=80=9D 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 comma=
nds
fits the window without scrolling.

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

3. =E2=80=9CThis is a link=E2=80=9D 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 buff=
er
again.

   Alternatively, you can use `less` to do the screen buffer switching. Aft=
er
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

=E2=80=9Cline 5=E2=80=9D and everything above is now identified as link and=
 clickable via
Ctrl+Click. When ctrl-clicking, the error =E2=80=9CMalformed URL=E2=80=9D i=
s shown. This
includes the previously working =E2=80=9CThis is a link=E2=80=9D 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=20
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

--=20
You are receiving this mail because:
You are the assignee for the bug.=