Mercurial > vim-lawrencium
comparison plugin/lawrencium.vim @ 30:35d097b9513c
Fixed a bug with the status line indicator.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Fri, 23 Dec 2011 15:07:10 -0800 |
parents | 0cdfdab43907 |
children | 799c7b57e19a |
comparison
equal
deleted
inserted
replaced
29:1ce59d5aa5e9 | 30:35d097b9513c |
---|---|
711 if !exists('b:mercurial_dir') | 711 if !exists('b:mercurial_dir') |
712 return '' | 712 return '' |
713 endif | 713 endif |
714 let l:prefix = (a:0 > 0 ? a:1 : '') | 714 let l:prefix = (a:0 > 0 ? a:1 : '') |
715 let l:suffix = (a:0 > 1 ? a:2 : '') | 715 let l:suffix = (a:0 > 1 ? a:2 : '') |
716 let l:branch = 'default' | |
716 let l:branch_file = s:hg_repo().GetFullPath('.hg/branch') | 717 let l:branch_file = s:hg_repo().GetFullPath('.hg/branch') |
717 let l:branch = readfile(l:branch_file)[0] | 718 if filereadable(l:branch_file) |
719 let l:branch = readfile(l:branch_file)[0] | |
720 endif | |
718 return l:prefix . l:branch . l:suffix | 721 return l:prefix . l:branch . l:suffix |
719 endfunction | 722 endfunction |
720 | 723 |
721 " Rescans the current buffer for setting up Mercurial commands. | 724 " Rescans the current buffer for setting up Mercurial commands. |
722 " Passing '1' as the parameter enables debug traces temporarily. | 725 " Passing '1' as the parameter enables debug traces temporarily. |