Handle functions that return a:lines
The logic to clear a:lines and replace it with the return of the function failed pretty miserably when the function returned a:lines. It cleared a:lines and then replaced it with the (now empty) elements.
This commit is contained in:
parent
ef55d4b6eb
commit
d28a1791ea
@ -139,7 +139,7 @@ endfunction
|
|||||||
function! s:FilterString(lines, commandstring)
|
function! s:FilterString(lines, commandstring)
|
||||||
exe 'let rv = ' . a:commandstring
|
exe 'let rv = ' . a:commandstring
|
||||||
|
|
||||||
if type(rv) == type(a:lines)
|
if type(rv) == type(a:lines) && rv isnot a:lines
|
||||||
call filter(a:lines, 0)
|
call filter(a:lines, 0)
|
||||||
call extend(a:lines, rv)
|
call extend(a:lines, rv)
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user