KateView: speed up large view jumps
I've stumbled upon reported slow processing of https://bugs.kde.org/show_bug.cgi?id=436097. After some profiling it seems that positioning computation is rendering the whole document just to get an idea where is the destination line relative to current view. This change reduces the expensive calls of displayViewLine
with just single view "local" variant.
I've tried to come up with something less intrusive, hence the interface of displayViewLine
gets a little bit more complicated by returning -2
to signalize it's below the view and not a invalid cursor. I've checked other usages for the displayViewLine
and they are checking the return value against < 0
hence it should be ok.