Is last line showing?


#1

Greetings,

I display two buttons dynamically to go to beginning and end of current edit. I just recently started using the scroll paste end option.

This has made my ‘end’ button work incorrectly.

My question is, with this option enabled in mind, is there an easy way to check if the last line is visible in the viewport?

Thank you kindly for any help,
Chris


#2

Comparing the information returned by charCoords with that from getScrollInfo should work here.


#3

Perfect! Checking clientHeight > bottom of the last line worked perfect.

Thank you!