[vim/vim] `listchar` not using its highlight groups in selection (Issue #19872)

9 views
Skip to first unread message

Doug

unread,
Mar 31, 2026, 2:46:22 AMMar 31
to vim/vim, Subscribed
dougaak created an issue (vim/vim#19872)

I mainly want to ask if this is the expected behavior, but even if it is, personally I find it strange.

I use the leadmultispace to achieve the indentation ruler, and I noticed that in my own color scheme, those characters will not have the correct color in selection. It will use the highlight group of the first non-blank character in that line.

image.png (view on web)

Version: 9.2.89
OS: Windows, using terminal Vim in Windows Terminal, not gVim


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

Christian Brabandt

unread,
Apr 22, 2026, 12:43:46 PM (2 days ago) Apr 22
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19872)

how do you reproduce this?


Reply to this email directly, view it on GitHub, or unsubscribe.

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

Doug

unread,
Apr 22, 2026, 11:10:06 PM (2 days ago) Apr 22
to vim/vim, Subscribed
dougaak left a comment (vim/vim#19872)

Hi @chrisbra , I think this should work, assuming in terminal Vim.

  1. Start without profile: vim --clean
  2. Input something with leading whitespaces, e.g. "    hello world"
  3. :set list
  4. :set lcs+=space:+
  5. :hi clear Visual
  6. :hi Visual ctermbg=DarkBlue
  7. :hi SpecialKey ctermfg=Red
  8. After the above steps, the whitespaces should be in a red color "+"
  9. Now visual-select the whole line, and the whitespaces shall be in white, as it's using the Normal group


Reply to this email directly, view it on GitHub, or unsubscribe.

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

Reply all
Reply to author
Forward
0 new messages