aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2017-04-29 05:53:31 +0200
committerTeddy Wing2017-04-29 05:55:35 +0200
commit9ccc0ce69ffac2da269f411cbe810e4021a3f861 (patch)
treeacfa1f8a5a431302a3abaf4d7a1a9b88bf1deaa4
parent4bdd26ecda16e202b5725a14a8204618032c38f0 (diff)
downloadvim-gitcha-9ccc0ce69ffac2da269f411cbe810e4021a3f861.tar.bz2
autoload/gitcha.vim: Abbreviate commit SHA in the popup menu
Only show the first 10 characters of the commit SHA in the popup menu to allow more room for the subject. The first part of the SHA is enough to be able to identify it, so this gets rid of some non-essential information. The full commit SHA will still be inserted as a result of the completion.
-rw-r--r--autoload/gitcha.vim1
1 files changed, 1 insertions, 0 deletions
diff --git a/autoload/gitcha.vim b/autoload/gitcha.vim
index 9e397fe..0ceebab 100644
--- a/autoload/gitcha.vim
+++ b/autoload/gitcha.vim
@@ -46,6 +46,7 @@ function! s:BuildMatchDictionary(rev_list)
call add(matches, {
\ 'word': sha,
+ \ 'abbr': strpart(sha, 0, 10),
\ 'menu': subject
\ })
endfor