use editor.lastLine() method

[#43166483]