Skip to content

Commit

Permalink
docs(readme): fix underscore colours guide (#646)
Browse files Browse the repository at this point in the history
## Description

<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

According to [this answer](https://askubuntu.com/a/985386),
`\e[58:2:R:G:Bm` is considered a "rarely used incorrect format" for
truecolor.

I tested it on Windows Terminal with WSL2, and it didn’t work. After
changing the format to `\e[58::2:R:G:Bm`, which is noted as the
"commonly used standard way," it worked as expected.

The change I made is as follows:

```diff
- set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
+ set -as terminal-overrides ',*:Setulc=\E[58::2::::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
```

I’d appreciate it if someone could test this on more platforms.

## Related Issue(s)

<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->
  • Loading branch information
lljbash authored Oct 22, 2024
1 parent 2c85fad commit c75935b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ To have undercurls show up and in color, add the following to your
# Undercurl
set -g default-terminal "${TERM}"
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0
set -as terminal-overrides ',*:Setulc=\E[58::2::::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0
```

</details>
Expand Down

0 comments on commit c75935b

Please sign in to comment.