async: fix error, when mq is not enabled

fixes #1551
This commit is contained in:
Christian Brabandt 2017-08-29 12:47:29 +02:00
parent 09ab45a2fb
commit d3f8873469
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -15,16 +15,16 @@ function! s:untracked_output(dict, buf)
endfunction
function! s:mq_output(buf, file)
let buf=''
let buf=a:buf
if !empty(a:buf)
if a:buf is# 'no patches applied' ||
\ a:buf =~# "unknown command 'qtop'"
let buf = ''
elseif exists("b:mq") && b:mq isnot# a:buf
elseif exists("b:mq") && b:mq isnot# buf
" make sure, statusline is updated
unlet! b:airline_head
endif
let b:mq = a:buf
let b:mq = buf
endif
if has_key(s:mq_jobs, a:file)
call remove(s:mq_jobs, a:file)