Fix Number/Select highlighting for corner cases

This commit is contained in:
Marco Hinz 2014-09-02 17:56:15 +02:00
parent 9102978c7b
commit 4b9e87cdda
2 changed files with 3 additions and 3 deletions

View file

@ -485,7 +485,7 @@ function! s:set_mark(type) abort
let s:marked = {} let s:marked = {}
endif endif
let [id, path] = matchlist(getline('.'), '\v\[(.*)\]\s+(.*)')[1:2] let [id, path] = matchlist(getline('.'), '\v\[(.{-})\]\s+(.{-})')[1:2]
let path = fnamemodify(path, ':p') let path = fnamemodify(path, ':p')
if path =~# '\V<empty buffer>\|<quit>' || path =~# '^\w\+$' if path =~# '\V<empty buffer>\|<quit>' || path =~# '^\w\+$'

View file

@ -17,8 +17,8 @@ syntax match StartifyBracket /.*\%9c/ contains=
\ StartifyNumber, \ StartifyNumber,
\ StartifySelect, \ StartifySelect,
syntax match StartifySpecial /\V<empty buffer>\|<quit>/ syntax match StartifySpecial /\V<empty buffer>\|<quit>/
syntax match StartifyNumber /^\s*\[\zs[^BSVT]*\ze\]/ syntax match StartifyNumber /^\s*\[\zs[^BSVT]\{-}\ze\]/
syntax match StartifySelect /^\s*\[\zs[BSVT]*\ze\]/ syntax match StartifySelect /^\s*\[\zs[BSVT]\{-}\ze\]/
syntax match StartifyFile /.*/ contains= syntax match StartifyFile /.*/ contains=
\ StartifyBracket, \ StartifyBracket,
\ StartifyPath, \ StartifyPath,