[vim/vim] Weired behaviour when using undercurl on Windows (Issue #15947)

27 views
Skip to first unread message

Matthias

unread,
Oct 27, 2024, 7:39:36 AM10/27/24
to vim/vim, Subscribed

Steps to reproduce

I was experimenting with the undercurl functionality on Windows using Windows Terminal that would support it since recently.

I enabled it by adding the following lines in my vimrc:

  let &t_Us = "\e[4:2m"
  let &t_ds = "\e[4:4m"
  let &t_Ds = "\e[4:5m"
  let &t_Cs = "\e[4:3m"
  let &t_Ce = "\e[4:0m"
  let &t_8u = "\e[58:2::%lu:%lu:%lum"

This works perfectly fine in my vim 8.2 running in WSL. But in vim 9.1 on Windows this leads to unexpected side effect. While it does indeed undercurl spelling mistakes, as soon as something is undercurled the whole terminal starts flickering wildly in insert mode and sometimes the colors just invert.

I first assumed that it may be a Windows Terminal bug, but as this behaviour does not appear in WSL, also using Windows Terminal, it may very well also be an issue inside vim.

https://github.com/user-attachments/assets/de0bfe76-2b0a-4516-b5ad-fe4db19aadcc

Expected behaviour

I would expect using undercurl not to have any weird side effects.

Version of Vim

9.1.813 on Windows / 8.2 on WSL (Ubuntu 22.04)

Environment

Windows Terminal 1.21

Logs and stack traces

No response


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15947@github.com>

Christian Brabandt

unread,
Oct 27, 2024, 3:43:17 PM10/27/24
to vim/vim, Subscribed

can you reproduce this on other terminals?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15947/2440150820@github.com>

Matthias

unread,
Oct 28, 2024, 2:32:01 AM10/28/24
to vim/vim, Subscribed

In vim 9 on Xubuntu it works fine in the xfce-terminal.

Regarding Windows I don't know if any other terminal there actually supports undercurl and so on.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15947/2440665749@github.com>

Matthias

unread,
Oct 28, 2024, 3:42:37 PM10/28/24
to vim/vim, Subscribed

I installed WezTerm and Hyper and both produce the similar issues (though both do not support the displaying of undercurl).

I tried the following minimal special vimrc:

set nocompatible

set termguicolors

let &t_Us = "\e[4:2m"
let &t_ds = "\e[4:4m"
let &t_Ds = "\e[4:5m"
let &t_Cs = "\e[4:3m"
let &t_Ce = "\e[4:0m"
let &t_8u = "\e[58:2::%lu:%lu:%lum"

highlight SpellBad cterm=undercurl
highlight SpellCap cterm=undercurl

Then I started vim with vim --clean -u special-vimrc to be sure my other config is not to blame. Then type some nonsense text and finally activate set spell. Then continue typing in insert mode and witness things becoming weird.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15947/2442470086@github.com>

Dougaak

unread,
Apr 27, 2025, 10:25:47 PM4/27/25
to vim/vim, Subscribed
Dougaak left a comment (vim/vim#15947)

Also having this issue, I use vim in Powershell + Windows Terminal natively. Is there any progress on this issue? Would really love to be able to use undercurl.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15947/2833828749@github.com>

Taylor Buchanan

unread,
6:03 PM (4 hours ago) 6:03 PM
to vim/vim, Subscribed
gtbuchanan left a comment (vim/vim#15947)

Windows Terminal and WezTerm Nightly both display the underlines correctly when running the following command in PowerShell (pwsh):

Write-Host "`e[58:2::255:0:0m`e[4:1msingle`e[4:2mdouble`e[4:3mcurly`e[4:4mdotted`e[4:5mdashed`e[0m"
image.png (view on web)

However, Vim 9.1 still exhibits strange behavior. I haven't tried an isolated .vimrc, but in my main .vimrc it manifests as the cursor jumping everywhere and my text being mostly jumbled.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15947/3746949418@github.com>

Taylor Buchanan

unread,
9:19 PM (1 hour ago) 9:19 PM
to vim_dev
I have the same issue on Windows with WezTerm Nightly. Running the following command in PowerShell (pwsh in WezTerm and Windows Terminal) outputs the appropriate underlines:

```
Write-Host "`e[58:2::255:0:0m`e[4:1msingle`e[4:2mdouble`e[4:3mcurly`e[4:4mdotted`e[4:5mdashed`e[0m"
```

Screenshot 2026-01-13 164535.png

However, Vim 9.1 completely freaks out
Reply all
Reply to author
Forward
0 new messages