From c9f26c43d89643aef941c049a2b411e92416dcbb Mon Sep 17 00:00:00 2001 From: Subhaditya Nath Date: Thu, 22 Oct 2020 19:39:18 +0530 Subject: [PATCH] Update syntax matches Previously, the highlight of the `------------` line below the `Last Update:` changed from `plugH2` on the whole line to `plugDash` on the first `-` when the cursor moved over it and went below it. This commit updates the `syn match` commands a bit to correct that issue. Closes junegunn/vim-plug#1027 --- plug.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plug.vim b/plug.vim index 6393d8d..865ce3f 100644 --- a/plug.vim +++ b/plug.vim @@ -804,7 +804,7 @@ function! s:syntax() syn match plugNumber /[0-9]\+[0-9.]*/ contained syn match plugBracket /[[\]]/ contained syn match plugX /x/ contained - syn match plugDash /^-/ + syn match plugDash /^-\{1}\ / syn match plugPlus /^+/ syn match plugStar /^*/ syn match plugMessage /\(^- \)\@<=.*/ @@ -822,6 +822,7 @@ function! s:syntax() syn match plugError /^x.*/ syn region plugDeleted start=/^\~ .*/ end=/^\ze\S/ syn match plugH2 /^.*:\n-\+$/ + syn match plugH2 /^-\{2,}/ syn keyword Function PlugInstall PlugStatus PlugUpdate PlugClean hi def link plug1 Title hi def link plug2 Repeat