mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-20 12:34:42 +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()
|
||||
if s:has_lawrencium
|
||||
let stl=lawrencium#statusline()
|
||||
let mq=system('hg qtop')
|
||||
if v:shell_error==0
|
||||
if v:shell_error==0 && !empty(stl)
|
||||
let mq=matchstr(mq, '.*\ze\n')
|
||||
return lawrencium#statusline(). '/'. mq
|
||||
return printf("%s/%s", stl, mq)
|
||||
endif
|
||||
return lawrencium#statusline()
|
||||
return stl
|
||||
endif
|
||||
return ''
|
||||
endfunction
|
||||
|
Loading…
x
Reference in New Issue
Block a user