400 line document be at first line Press Ctrl+G and go to line 100 Old behaviour: Line 100 is in the middle of the view New behaviour: Line 100 is at the bottom of the view Old behaviour is much more useful because when i am interested in a line i'm usually interested in its surroundings, and that includes line 101 that is now not visible while before it was.
I notice also such less optimal behavior and guess it's caused by this one: https://phabricator.kde.org/D17857#425268 (now it's line 1493, not 63) But just to revert this isn't a proper fix. Perhaps should there some special function for such "goto" action with a better centering to the screen. I guess it's not only an issue of these explicit "Goto Line" action but also when jump to e.g. next search result.
IMHO, the change in updateCursor(), should be reverted; and if there's a use case where that behaviour isn't wanted, then we can make setCursorPosition() and setCursorPositionInternal() have an extra boolean parameter - that's true by default - to center the cursor line in the view; that means any caller that doesn't want that bevhaviour can easily opt-out, a case by case treatment...
Ping.
I guess, as nobody seems to have time, perhaps partial revert is a good idea. Which commit was it exactly?
Git commit 49b8add426a252afc1976188baebde194d75ced2 by Christoph Cullmann. Committed on 07/07/2019 at 12:04. Pushed by cullmann into branch 'master'. fix goto line centering force center for any external set cursor position call M +1 -1 src/view/kateview.cpp https://commits.kde.org/ktexteditor/49b8add426a252afc1976188baebde194d75ced2
Hmm, you only decided to forcecenter for external calls. But this is about Ctrl+G This is not an external call, is it?
;=) As confusing this is, the call for CTRL-G is "external", too. For me it properly centerse again for that action, too.