[konsole] [Bug 434187] New: background color is not reset properly if ANSI reset code is on newline

paul bugzilla_noreply at kde.org
Tue Mar 9 14:15:17 GMT 2021


https://bugs.kde.org/show_bug.cgi?id=434187

            Bug ID: 434187
           Summary: background color is not reset properly if ANSI reset
                    code is on newline
           Product: konsole
           Version: unspecified
          Platform: Archlinux Packages
                OS: Linux
            Status: REPORTED
          Severity: minor
          Priority: NOR
         Component: emulation
          Assignee: konsole-devel at kde.org
          Reporter: pl.gruener at gmail.com
  Target Milestone: ---

Created attachment 136525
  --> https://bugs.kde.org/attachment.cgi?id=136525&action=edit
Screenshot of colored command output.

SUMMARY

When setting the background color via an ANSI SGR escape sequence such as
'\e[41m', and the reset sequence '\e[0m' is placed on a new line, the bg-color
is not reset immediately.

STEPS TO REPRODUCE

printf '\e[0mLine1\n\e[41mLine2\n\e[0mLine3\nLine4\n'

OBSERVED RESULT

see screenshot.
The word "Line2" has a colored background as expected, but the empty end of
"Line3" is colored as well.

(If the reset comes after multiple newlines, only the first '\n' seems to
respect the bg color, subsequent lines color the whole window width.)


EXPECTED RESULT
Only "Line2" should have a red background, same as in

printf '\e[0mLine1\n\e[41mLine2\e[0m\nLine3\nLine4\n'

On other terminal emulators such as xterm or QTerminal, there is no difference
between those two commands.

SOFTWARE/OS VERSIONS
Arch-Linux, Kernel 5.11.2
KDE Plasma Version: 5.21.2
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2

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


More information about the konsole-devel mailing list