Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ECMA-48 escape sequences for faint/half-bright and crossed-out/strikethrough #1059

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

stanspas
Copy link

@stanspas stanspas commented Aug 8, 2019

No description provided.

Stanislav Spassov added 2 commits August 3, 2019 20:10
ECMA-48 defines rendition mode 2 as:
  faint, decreased intensity or second colour

Faint mode shares its inverse (22) with bold (1):
  normal colour or normal intensity (neither bold nor faint)

The Renditions::attribute_type enum already included 'faint'
but the value remained unused until now.

Signed-off-by: Stanislav Spassov <[email protected]>
ECMA-48 defines rendition mode 9 as:
  crossed-out (characters still legible but marked as to be deleted),
and mode 29 as the inverse:
  not crossed out

Modern terminals (including xterm, tmux, libvte, etc.) support rendering
strikethrough. Further, ncurses since version 6.1 includes the smxx/rmxx
user-defined terminal capabilities in the tmux and xterm-basic
databases.

Note that the new attribute still fits in the eight bits allocated for
Renditions::attributes, so there is no need to increase the size of Cell.

Signed-off-by: Stanislav Spassov <[email protected]>
@stanspas stanspas marked this pull request as ready for review August 8, 2019 20:43
@Juerd
Copy link

Juerd commented Feb 1, 2023

What needs to be added or changed before this can be merged? It's a trivial change, it works, and it's a feature I'd really like to have.

I'm currently patching mosh on several machines by hand, because a program uses faint text, which mosh does not yet support. It would support it with this PR.

I've checked the resources, and the ANSI escape sequences used in these commits are correct, including the dual functionality of 22 which unsets both dim and bold.

Please consider merging this PR. If any further work is needed, I might be willing to do it. But from the looks of it, it looks very correct and complete.

jdrouhard added a commit to jdrouhard/mosh that referenced this pull request May 20, 2023
Add support for ECMA-48 escape sequences for faint/half-bright and crossed-out/strikethrough
jdrouhard added a commit to jdrouhard/mosh that referenced this pull request Aug 20, 2023
@carloscabanero
Copy link

Updated with new formatting here too: https://github.com/blinksh/mosh-server/tree/dim-and-strikethrough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants