mirror of
https://github.com/junegunn/vim-plug.git
synced 2024-12-23 20:45:31 -07:00
Commit hash in PlugDiff output can be longer than 7 characters
Close #597
This commit is contained in:
parent
f551a71688
commit
e3252aae2c
6
plug.vim
6
plug.vim
@ -621,10 +621,10 @@ function! s:syntax()
|
||||
syn match plugTag /(tag: [^)]\+)/
|
||||
syn match plugInstall /\(^+ \)\@<=[^:]*/
|
||||
syn match plugUpdate /\(^* \)\@<=[^:]*/
|
||||
syn match plugCommit /^ \X*[0-9a-f]\{7} .*/ contains=plugRelDate,plugEdge,plugTag
|
||||
syn match plugCommit /^ \X*[0-9a-f]\{7,9} .*/ contains=plugRelDate,plugEdge,plugTag
|
||||
syn match plugEdge /^ \X\+$/
|
||||
syn match plugEdge /^ \X*/ contained nextgroup=plugSha
|
||||
syn match plugSha /[0-9a-f]\{7}/ contained
|
||||
syn match plugSha /[0-9a-f]\{7,9}/ contained
|
||||
syn match plugRelDate /([^)]*)$/ contained
|
||||
syn match plugNotLoaded /(not loaded)$/
|
||||
syn match plugError /^x.*/
|
||||
@ -2285,7 +2285,7 @@ function! s:preview_commit()
|
||||
let b:plug_preview = !s:is_preview_window_open()
|
||||
endif
|
||||
|
||||
let sha = matchstr(getline('.'), '^ \X*\zs[0-9a-f]\{7}')
|
||||
let sha = matchstr(getline('.'), '^ \X*\zs[0-9a-f]\{7,9}')
|
||||
if empty(sha)
|
||||
return
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user