Only show hg qtop output, if branch is also shown

This commit is contained in:
Christian Brabandt 2016-02-14 17:05:53 +01:00
parent 8023f6f5dc
commit da78d4a7bb

View File

@ -102,12 +102,13 @@ endfunction
function! s:get_hg_branch() function! s:get_hg_branch()
if s:has_lawrencium if s:has_lawrencium
let stl=lawrencium#statusline()
let mq=system('hg qtop') let mq=system('hg qtop')
if v:shell_error==0 if v:shell_error==0 && !empty(stl)
let mq=matchstr(mq, '.*\ze\n') let mq=matchstr(mq, '.*\ze\n')
return lawrencium#statusline(). '/'. mq return printf("%s/%s", stl, mq)
endif endif
return lawrencium#statusline() return stl
endif endif
return '' return ''
endfunction endfunction