mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-21 04:54:45 +02:00
Only show hg qtop output, if branch is also shown
This commit is contained in:
parent
8023f6f5dc
commit
da78d4a7bb
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user