I am trying to capture the result returned from a function implementing
range as an argument but apparently I get a comparison.
With the following code:
function! GetNumber() range return 4 endfunction function! GetString() range return "" endfunction function! GetList() range echo a:firstline echo a:lastline return  endfunction
After having selected some lines, I do the following operations:
let a = <,'>GetNumber(): returns 0
let a = <,'>GetString(): returns 1
let a = <,'>GetList():
Error E691: Can only compare List with List
E15: Invalid expression: '<,'>GetList().
Yet, I can access to the variables
a:lastline in the functions. I would like to know where could be my error and also where comes this comparison?
Does the same thing on Vim 7.4 and Vim 8.