Fix regular expressions for hex digits

This commit is contained in:
Junegunn Choi 2016-03-22 12:53:05 +09:00
parent a4e2c064f0
commit e4ddb89c20

View File

@ -563,14 +563,14 @@ function! s:syntax()
syn match plugStar /^*/
syn match plugMessage /\(^- \)\@<=.*/
syn match plugName /\(^- \)\@<=[^ ]*:/
syn match plugSha /\%(: \)\@<=[0-9a-z]\{4,}$/
syn match plugSha /\%(: \)\@<=[0-9a-f]\{4,}$/
syn match plugTag /(tag: [^)]\+)/
syn match plugInstall /\(^+ \)\@<=[^:]*/
syn match plugUpdate /\(^* \)\@<=[^:]*/
syn match plugCommit /^ \X*[0-9a-z]\{7} .*/ contains=plugRelDate,plugEdge,plugTag
syn match plugCommit /^ \X*[0-9a-f]\{7} .*/ contains=plugRelDate,plugEdge,plugTag
syn match plugEdge /^ \X\+$/
syn match plugEdge /^ \X*/ contained nextgroup=plugSha
syn match plugSha /[0-9a-z]\{7}/ contained
syn match plugSha /[0-9a-f]\{7}/ contained
syn match plugRelDate /([^)]*)$/ contained
syn match plugNotLoaded /(not loaded)$/
syn match plugError /^x.*/
@ -2023,7 +2023,7 @@ function! s:preview_commit()
let b:plug_preview = !s:is_preview_window_open()
endif
let sha = matchstr(getline('.'), '^ \X*\zs[0-9a-z]\{7}')
let sha = matchstr(getline('.'), '^ \X*\zs[0-9a-f]\{7}')
if empty(sha)
return
endif