Hyper: Add support for underline ANSI escape code

Created on 24 May 2019  路  6Comments  路  Source: vercel/hyper

  • [x] I am on the latest Hyper.app version
  • [x] I have searched the issues of this repo and believe that this is not a duplicate Comment: I believe it is not duplicate of an open issue, see below.
  • OS version and name: MacOS Mojave 10.14.5
  • Hyper.app version: 3.0.2
  • Link of a Gist with the contents of your .hyper.js: N/A
  • Relevant information from devtools : N/A
  • The issue is reproducible in vanilla Hyper.app: yes

Issue

This is a continuation of the closed issue: https://github.com/zeit/hyper/issues/3194. Albeit the old issue being closed the problem still exists and is reproducible.

Currently Hyper does not display text decorated with ANSI escape code 4m for underline correctly. I am not sure if this is a bug or feature request. However, a commenter from the old issue suggests this has been supported before and hence, should be classified as a bug. See https://github.com/zeit/hyper/issues/3194#issuecomment-456966115

Reproduce

Run

echo -e "\033[4mhyper\033[m"

Expected result

The output gets underlined. See screenshot from iterm2.

image

Actual result

The output does not get underlined. See screenshot from Hyper.

image

Most helpful comment

I accidentally found a big hint. It looks like the webGLRenderer is causing problems. In fact, if I disable webGLRenderer in .hyper.js the underlines appear. See

image

image

All 6 comments

By going back to an older version of Hyper I was able to confirm: Underline used to work. See screenshot from Hyper Version 2.1.2

image

You might be seeing microsoft/vscode#35901

I think the VS Code issue is related to similiar issues in Hyper about displaying under-scores, see https://github.com/zeit/hyper/issues/2812
However, (and as far as I understand) this issue is distinct from the above mentioned.

Note, how in the screenshots for iterm2 and Hyper 2.1.2 y and p reach pretty far down and intersect the underline. If the problem originated from misaligned bounding boxes (similar to the VS Code one), I would expect y and p to be cut off in Hyper 3.0.2. But y and p look properly rendered in 3.0.2.

I accidentally found a big hint. It looks like the webGLRenderer is causing problems. In fact, if I disable webGLRenderer in .hyper.js the underlines appear. See

image

image

Any progress? Still happens to me.

禄 hyper version
3.0.2

The webgl renderer doesn't support underline yet https://github.com/xtermjs/xterm.js/issues/2251

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stan-stripe picture stan-stripe  路  3Comments

eoinmurray picture eoinmurray  路  3Comments

weabot picture weabot  路  3Comments

cooperpellaton picture cooperpellaton  路  3Comments

cilice picture cilice  路  3Comments