-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Restoring a User{N}
highlight inside an item group causes the whole item group to disappear
#29306
Comments
You don't need a Lua function to reproduce this. It also happens when putting it inside a string literal: :set statusline=--%(x%{%'%1*MyFunc%*'%}x%)-- |
Actually you don't need a expression either: :set statusline=--%(x%1*MyFunc%*x%)-- |
Thanks for pointing this out, I didn't even consider putting a string literal inside a I should report this in vim/vim. I'm closing this issue for now. |
User{N}
highlight inside a v:lua
expansion causes the whole item group to disappearUser{N}
highlight inside an item group causes the whole item group to disappear
This is indeed an upstream bug. |
Problem
Given:
statusline
(e.g.return '%1*hello%*'
)%([%{%v:lua.myfunc()%}]%)
)The entire item group disappears if the expansion contains a highlight restore item: either
%*
or%0*
.It does get rendered if a
%N*
item is positioned before the item group.Steps to reproduce
Simple expansion, no other user highlight in the statusline:
statusline is rendered without the item group, neither the colored text nor the inner 'x's are printed:
Item group prefixed with another user highlight (it doesn't matter which one):
statusline is rendered with the item group, but not with the desired appearance due to workarounds:
Here the item group no longer disappears, but having to prefix it with a
User{N}
highlight is a hack that results in visual glitches, and possibly other side effects.Expected behavior
In the first case above, the statusline should have been rendered with the text "MyFunc" highlighted in red, with all surrounding characters highlighted according to the built-in
StatusLine
highlight group:Neovim version (nvim -v)
v0.11.0-dev-219+gc37695a5d
Vim (not Nvim) behaves the same?
N/A (no Lua)
Operating system/version
Debian 12
Terminal name/version
WezTerm
$TERM environment variable
wezterm
Installation
Build from repo
The text was updated successfully, but these errors were encountered: