From 4b9e87cdda9d5b25946702d9ade606e161f2ea21 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Tue, 2 Sep 2014 17:56:15 +0200 Subject: [PATCH] Fix Number/Select highlighting for corner cases --- autoload/startify.vim | 2 +- syntax/startify.vim | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/autoload/startify.vim b/autoload/startify.vim index 1cf5f4b..f888ef4 100644 --- a/autoload/startify.vim +++ b/autoload/startify.vim @@ -485,7 +485,7 @@ function! s:set_mark(type) abort let s:marked = {} endif - let [id, path] = matchlist(getline('.'), '\v\[(.*)\]\s+(.*)')[1:2] + let [id, path] = matchlist(getline('.'), '\v\[(.{-})\]\s+(.{-})')[1:2] let path = fnamemodify(path, ':p') if path =~# '\V\|' || path =~# '^\w\+$' diff --git a/syntax/startify.vim b/syntax/startify.vim index 48c4853..d898027 100644 --- a/syntax/startify.vim +++ b/syntax/startify.vim @@ -17,8 +17,8 @@ syntax match StartifyBracket /.*\%9c/ contains= \ StartifyNumber, \ StartifySelect, syntax match StartifySpecial /\V\|/ -syntax match StartifyNumber /^\s*\[\zs[^BSVT]*\ze\]/ -syntax match StartifySelect /^\s*\[\zs[BSVT]*\ze\]/ +syntax match StartifyNumber /^\s*\[\zs[^BSVT]\{-}\ze\]/ +syntax match StartifySelect /^\s*\[\zs[BSVT]\{-}\ze\]/ syntax match StartifyFile /.*/ contains= \ StartifyBracket, \ StartifyPath,