First of all I'm using Neovim(v0.8.1) so I don't know if it also applies to Vim.
I'm creating a syntax file with the following region :
syn region TestRegion start='^RegionStart\n^NextLineStart' end='^RegionEnd'
hi TestRegion guifg=Red
I write the following :
RegionStart
NextLineStart
placeholder
RegionEnd
When I "break" the pattern and delete the 'N' of "NextLineStart", the lines stay highlighted. If I go to the end of the document then come back or reset the syntax (:set syn=MySyntax) it is not highlighted anymore.
Then if I reinsert the 'N' it doesn't highlight the region until I make the same manipulation.
On the other hand it reacts immediately when I modify "RegionStart" or "RegionEnd" either by entering or breaking the pattern.
What's stranger to me is that if I delete the 'S' of "NextLineStart" it does not react but if I do my little manipulation to make it not highlighted then reinsert the 'S' in its place it immediatly highlights the region.
Am I doing something wrong ? If not is there a way around it ?