support cursor and line length

support cursor and line.length like the real readline does

because of the comment "// rli itself has 'line', so we need to call it lines" I suspect this not to be good enough, please help with any suggestions.