From e3252aae2c9fa6d5ab9bbd3dfe149f35573f4773 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 17 Feb 2017 13:32:59 +0900 Subject: [PATCH] Commit hash in PlugDiff output can be longer than 7 characters Close #597 --- plug.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plug.vim b/plug.vim index 2a61349..7819a5a 100644 --- a/plug.vim +++ b/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