I'm creating a diff/patch frontend similar to Kompare but using KTextEditor to display/edit source/destination files. In order to be able to sync the scrolling positions of the two Views and also to overlay diff indicators (see screenshot), I'm exposing the following:
- setScrollPosition: scrolls the View to a cursor position
- setHorizontalScrollPosition: scrolls the View to a column
- maxScrollPosition: returns the cursor position of the maximum vertical scroll position
- firstDisplayedLine: returns the first visible line in the View
- lastDisplayedLine: returns the last visible line in the View
- textAreaRect: returns the View's text area rectangle excluding border, scrollbars, etc.