Could somebody explain me what happens here? I want to get my plugin update the airline at the MpcAdd
function call. Yet, no calls seem to work from inside the function. The MpcAdd
function call is triggered.
(If I was to write the qwe
line immediately after the asd
line, qwe
would show up)
function! s:RefreshAirline(text)
call airline#parts#define('andrew', {'text': a:text})
let g:airline_section_b = airline#section#create(['andrew'])
endfunction
call s:RefreshAirline("asd")
function! s:MpcAdd(line)
let l:file = split(a:line)[0]
call s:RefreshAirline("qwe") <--- does not work here
silent execute ":redraw!"
endfunction
echoerr 'RefreshAirline, text = '.text
tos:RefreshAirline()
to see whether it's actually called withqwe
or not.