From 031cb310565e281aa8e0697e6fd753fb1f86d16c Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Fri, 22 Sep 2017 21:39:17 +0200 Subject: [PATCH] branch: do not show errors for mq extensions skip anything that matches abort e.g. running hg qtop with Vims path outside of the repository returns something like "abort: no repository found in ..." in that case, do not show anything. --- autoload/airline/async.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autoload/airline/async.vim b/autoload/airline/async.vim index 454db1dd..b7b72b5e 100644 --- a/autoload/airline/async.vim +++ b/autoload/airline/async.vim @@ -14,11 +14,13 @@ function! s:untracked_output(dict, buf) endif endfunction +" also called from branch extension (for non-async vims) function! airline#async#mq_output(buf, file) let buf=a:buf if !empty(a:buf) if a:buf =~# 'no patches applied' || - \ a:buf =~# "unknown command 'qtop'" + \ a:buf =~# "unknown command 'qtop'" || + \ a:buf =~# "abort" let buf = '' elseif exists("b:mq") && b:mq isnot# buf " make sure, statusline is updated