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

Curly underlines not working in Zellij #1594

Open
paride opened this issue Jul 17, 2022 · 6 comments
Open

Curly underlines not working in Zellij #1594

paride opened this issue Jul 17, 2022 · 6 comments
Labels
compatibility Issues with VT/terminal compatibility suspected bug

Comments

@paride
Copy link

paride commented Jul 17, 2022

Basic information

zellij --version: 0.29.1
stty size: 24 80
uname -av: Linux stramonio 5.19.0-9-generic #9-Ubuntu SMP PREEMPT_DYNAMIC Mon Jul 4 13:18:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Further information

Several terminals support "curly underlines" or "undercurls", which are used by editors like Neovim to highlight spelling errors and similar. See https://evantravers.com/articles/2021/02/05/curly-underlines-in-kitty-tmux-neovim/ for a good coverage on the feature.

Terminal support for undercurls can be tested via:

printf '\e[4:3mUnderlined\n

I tested it with gnome-terminal an Tilix, this is the output:

image

However from within zellij (same terminal, same shell) no underline is produced:

image

In both cases I have

paride@stramonio:~$ echo $TERM
xterm-256color
paride@stramonio:~$ echo $VTE_VERSION
6800

so I'm not sure of where the undercurl capability is getting lost.

@a-kenji a-kenji added the compatibility Issues with VT/terminal compatibility label Jul 17, 2022
@fralcow
Copy link

fralcow commented Sep 17, 2022

I took a look at this bug, looks like the '\e[4:3mSomeText\n' does not work indeed, specifically the I '\e[4:3' part, since it's a combination of italic (code 3) and underscore (code 4) ansi parameters, hence /zellij/zellij-server/src/panes/terminal_character.rs throws an error, since it only matches vectors of len 1, and here it receives [4, 3] :
WARN |zellij_server::panes::ter| 2022-09-17 12:54:18.299 [screen ] [zellij-server/src/panes/terminal_character.rs:396]: unhandled csi m code [4, 3]

Interestingly enough, just the underscored text works just fine: printf '\e[4mUnderlined\n' . Vim, however, uses code [4, 3] to format underlined characters.
2022-09-17-1663412677_screenshot_548x139

I can try adding this [4, 3] parameter as one of the match cases to print characters as just underlined, but not sure how hacky of a solution this is. I'll try looking into the curly underscore stuff and see if it can be used.

@sploders101
Copy link

I added this in #2018
It looks like the escape sequences use sub-parameters (please excuse my ignorance on jargon; I don't have a lot of experience with terminal emulator code), using : instead of ;, and the match statement appears to handle this using two-dimensional iterators. I added it to the match statement and passed it through to the Display implementation and it seems to work well.

@gam-phon
Copy link

@imsnif what is the current progress on this?

@gmr458
Copy link

gmr458 commented May 15, 2023

any update on this?

@zicklag
Copy link

zicklag commented Nov 4, 2023

Looks like there's been some great progress in #2730! 🎉

@steakhutzeee
Copy link

steakhutzeee commented May 7, 2024

Hi, I'm using WSL2 in Windows Terminal and was able to see undercurls in Neovim with tmux by setting:

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

I see undercurls are enabled in Zellij config but they are not working. What do you suggest?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Issues with VT/terminal compatibility suspected bug
Projects
None yet
Development

No branches or pull requests

8 participants