last line detection


#1

I am in need of detecting when the cursor is on the last line (to disable some CSS) - I can do this using the onSelectionChange handler, but this seems highly inefficient, on every cursor move, etc I’m getting the total lines, then checking if the cursor is on that line.

is there a more efficient way of doing this?


#2

No, it’s fine. Calling .lastLine() is very cheap.


#3

Thank you!