Valid colors won't appear inside of a word, so we'll use a clever bit of
vim to match them only not immediately after a word (as opposed to a
WORD, they're not the same thing in vim.) This was done by patching the
patterns in about line 319-321.
This created a new problem however if an invalid color such as…
call minpac#add('gko/vim-coloresque')
…happened to appear in the same file as a valid '#add' color. To fix
that, we use the same '\w\@<!' trick on b:matchescache. Issue fixed.
Thanks to markzen for suggesting the regex solution, I'd never have
stumbled upon it myself without a pointer in the right direction.
This PR fixes #40 nicely.
Valid colors won't appear inside of a word, so we'll use a clever bit of vim to match them only not immediately after a word (as opposed to a WORD, they're not the same thing in vim.) This was done by patching the patterns in about line 319-321.
This created a new problem however if an invalid color such as…
call minpac#add('gko/vim-coloresque')
…happened to appear in the same file as a valid '#add' color. To fix that, we use the same '\w\@<!' trick on b:matchescache. Issue fixed.
Thanks to markzen for suggesting the regex solution, I'd never have stumbled upon it myself without a pointer in the right direction.