1
0
Fork 0
mirror of synced 2024-11-06 01:18:58 -05:00
ultimate-vim/sources_non_forked/vim-powerline/autoload/Powerline/Functions/hgrev.vim

18 lines
466 B
VimL
Raw Normal View History

2012-08-16 23:41:25 -04:00
function! Powerline#Functions#hgrev#Status(symbol) " {{{
if ! exists('*HGRev')
" HGRev hasn't been loaded yet
return ''
endif
if !exists("b:statusline_hg_status")
silent execute "RefreshMercurialRev"
endif
let b:statusline_hg_status=HGRev()
if b:statusline_hg_status != '-'
let ret = "\u26A1". '' . substitute(b:statusline_hg_status, '^[^ ]*', '\1', 'g')
let ret=substitute(ret,' M$','+','g')
else
let ret=''
endif
return ret
endfunction " }}}