screen-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[screen-devel] [bug #65513] Escape code handling rewrites codes between


From: anonymous
Subject: [screen-devel] [bug #65513] Escape code handling rewrites codes between application and terminal
Date: Sun, 24 Mar 2024 20:46:16 -0400 (EDT)

URL:
  <https://savannah.gnu.org/bugs/?65513>

                 Summary: Escape code handling rewrites codes between
application and terminal
                   Group: GNU Screen
               Submitter: None
               Submitted: Mon 25 Mar 2024 12:46:16 AM UTC
                Category: Program Logic
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
                 Release: None
         Discussion Lock: Any
           Fixed Release: None
         Planned Release: None
           Work Required: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Mon 25 Mar 2024 12:46:16 AM UTC By: Anonymous
Due to its the escape code handling resulting in an internal simulation of the
effect rather than recording of the code, screen can emit different escape
codes from those it was originally given. In some cases the substituted codes
are not equivalent, depending on the terminal.

This is particularly noticeable with recent coreutils' colourisation of 'ls'
output, as since commit 52aeae2c ("dircolors: colorize backup files with
bright black"), this has potentially included aixterm rendition codes. The bug
becomes evident in the linux virtual console when backup files listed are
interspersed with regular files - "bright black" (ie. grey) colour is seen as
expected, but regular files may be in standard white or bold white depending
on whether they appear first or last.

Capturing the output of `printf '%b' "TERM=$TERM: " '\033[90m' '(90m)'
'\033[0m' '(0m)' '\033[1m' '(1m)' '\033[0m' '(0m)\n'` with /usr/bin/script is
informative, with "TERM=linux: ^[[90m(90m)^[[0m(0m)^[[1m(1m)^[[0m(0m)^M"
resulting from output capture in the linux terminal and "TERM=screen.linux:
^[[90m(90m)^[[39m(0m)^[[1m(1m)^[[m^O(0m)^[[10;1H" from output under screen. On
a monitor it is evident that the behaviour of the linux console differs from
screen's internal emulation: specifically a bold attribute is also added by
the former, which in this demonstration remains in effect until manually
requested and then cancelled. When demonstrating with 'ls', a suitably-named
executable file has a similar restorative effect.

https://unix-junkie.github.io/christmas/Comparison%20of%20Terminal%20Emulators%20-%20Colour%20Support.html
suggests other graphical terminals also use this interpretation of the aixterm
colour codes and may therefore be similarly affected by inappropriate
substitution of the 'sgr0' escape sequence.







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?65513>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]