branch: allow multibyte chars in shortening algorithm
previously, the branch extension used name[0:6], however that would break with multibyte characters, since this is a byte index and not a character index. fixes #1686
This commit is contained in:
parent
958f78335e
commit
4237bfb052
@ -113,7 +113,7 @@ function! s:display_git_branch()
|
||||
if ref !~ "^fatal: no tag exactly matches"
|
||||
let name = s:format_name(substitute(ref, '\v\C^%(heads/|remotes/|tags/)=','',''))."(".name.")"
|
||||
else
|
||||
let name = commit[0:s:sha1size-1]."(".name.")"
|
||||
let name = matchstr(commit, '.\{'.s:sha1size.'}')."(".name.")"
|
||||
endif
|
||||
endif
|
||||
catch
|
||||
|
Loading…
x
Reference in New Issue
Block a user