Consider the following script:
========================= bug.vim =========================
highlight clear SpellBad
highlight FgYellowBgBlue ctermfg=Yellow ctermbg=Blue
highlight FgGreen ctermfg=Green
highlight SpellBad ctermfg=Cyan ctermbg=Red
call matchadd('FgGreen', '.*')
syntax match FgYellowBgBlue /.*/
call setline('.', ['abcdef'])
set spell
========================= bug.vim =========================
If you run it you will see that in place of the Red background highlighting of
the “abcdef” it is highlighted with Blue. The problem is that if there is no
syntax highlighting then background color is taken from SpellBad highlight
group. If there is no match then background color is taken from SpellBad
highlight group as well. But even though match does not define background
highlighting and normally spelling highlighting overrides syntax highlighting
when there is match without bg, syntax with and misspelled word with syntax bg
is used.
Same thing happens if you exchange fg and bg.
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.