diff options
-rw-r--r-- | autoload/gitcha.vim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/autoload/gitcha.vim b/autoload/gitcha.vim index d84cf15..9e397fe 100644 --- a/autoload/gitcha.vim +++ b/autoload/gitcha.vim @@ -40,9 +40,9 @@ function! s:BuildMatchDictionary(rev_list) let commits = split(a:rev_list, '\n') for commit in commits - let commit_parts = split(commit) - let sha = commit_parts[0] - let subject = commit_parts[1] + let separator = stridx(commit, ' ') + let sha = strpart(commit, 0, separator) + let subject = strpart(commit, separator + 1) call add(matches, { \ 'word': sha, |