From 1e6923dcd262bcf5cfeb2fcb3506964113097666 Mon Sep 17 00:00:00 2001 From: leafOfTree Date: Mon, 19 Oct 2026 13:42:16 +0000 Subject: [PATCH] Don't sync syntax to a block ending on the same line A one-line block like matched the sync pattern of the block start, so when Vim synced syntax at or after it, e.g. after jumping to a later line, the following blocks were taken as inside the style block. --- syntax/vue.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/syntax/vue.vim b/syntax/vue.vim index 507a50e..edfafa6 100644 --- a/syntax/vue.vim +++ b/syntax/vue.vim @@ -124,7 +124,10 @@ function! s:SetSyntax(block, syntax, has_lang) \.' end=+'.end.'+' \.' keepend contains='.syntax_group.', vueTag' - execute 'syntax sync match vueSync groupthere '.name.' +'.start.'+' + " Don't sync to a block ending on the same line, like + " + let sync_start = start.'\(.*'.end_tag.'\)\@!' + execute 'syntax sync match vueSync groupthere '.name.' +'.sync_start.'+' execute 'syntax sync match vueSync groupthere NONE +'.end.'+' " Block like