Skip to content

Test: Terminal underline styles and colors #158827

@Tyriar

Description

@Tyriar

Refs: #156983

Complexity: 3

Authors: @meganrogge @Tyriar

Create Issue


The terminal now supports escape sequences for different styles of underline as well as full color support. Here are some docs on the feature https://sw.kovidgoyal.net/kitty/underlines/. In addition to this, when GPU acceleration is using the webgl renderer (on/auto), we do improved underlining by not overlapping with the glyphs:

image

Basic usage (echo -e "<string>"):

# Previously supported underline sequences
\x1b[4m    # straight underline
\x1b[24m   # no underline

# Underline styles
\x1b[4:0m  # no underline
\x1b[4:1m  # straight underline
\x1b[4:2m  # double underline
\x1b[4:3m  # curly underline
\x1b[4:4m  # dotted underline
\x1b[4:5m  # dashed underline

# Underline colors (a style is required)
\x1b[58:5:32m            # 256 color palette: ANSI color number 32, see https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit
\x1b[58:2:0:255:128:64m  # True color: Red=255, Green=128, Blue=64
\x1b[59m                 # reset color

Ensure all of the above sequences work as expected and look good, some things to tweak while testing:

  • terminal.integrated.gpuAcceleration ("on" or "canvas", this will not work when "off" is used)
  • terminal.integrated.fontSize
  • window.zoomLevel
  • The cells look correct when selected
  • Scroll up and down

This feature does not work on Windows because of a limitation in conpty.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions