vim --clean -c "call prop_type_add('Test', {'highlight': 'SpecialKey'}) | echo getwinvar([{'text': 'Some text', 'props': [{'col': 1, 'type': 'Test', 'text': ' + '}]}]->popup_create({'line': 5, 'col': 20, 'maxwidth': 80, 'highlight': 'PMenu', 'border': [], 'borderchars': [' '], 'moved': 'any'}), '&wincolor')"
Virtual text should use the value of wincolor (PMenu in the above example).
9.0.818
Operating system: gentoo linux
Terminal: konsole
Value of $TERM: xterm-256color
Shell: zsh 5.9
No response
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
There is no virtual text in your example. What is the output of :hi SpecialKey?
And could you please use fenced code blocks? It's a lot easier to read than tucking everything into one line.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Sorry, the virtual text is text: ' + ' defined in the text properties.
In a script it would look like:
vim9scriptprop_type_add('Test', {'highlight': 'SpecialKey'})
var mytext = [{
'text': 'Some text', 'props': [{ 'col': 1, 'type': 'Test', 'text': ' + '
}] }] mytext->popup_create({
'line': 5, 'col': 20, 'maxwidth': 80, 'highlight': 'PMenu', 'border': [], 'borderchars': [' '], 'moved': 'any' })
getwinvar was there only to prove that wincolor option was set as PMenu (but i missed to take it in the screenshot)
SpecialKey was just the first default highlight color without bg I took from :hi output for the test:
:hi SpecialKey SpecialKey xxx term=bold ctermfg=81 guifg=Cyan
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Closed #11462 as completed via ee28c70.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()