Fixing autoscroll down in katepart
ClosedPublic

Authored by axkibe on Jun 24 2019, 11:59 AM.

Details

Summary

BUG: 408874

Diff Detail

Repository
R39 KTextEditor
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
axkibe requested review of this revision.Jun 24 2019, 11:59 AM
axkibe created this revision.

This patch is suggestion to fix https://bugs.kde.org/show_bug.cgi?id=408874

Auto scrolling down seems to hugely accelerated downward beyond the intent of the coding, because the scrolling interferes with cursorPlacement. (See in contrast to this scrolling up). While this patch has been done due to necessity to an old version, newer versions seems to still suffer from the same issue.

It fixes two places, in KateViewInternal::scrollTimeout() it first calculates the line to scrollTo, then places the cursor, and the scrolls to that place. First scrolling (original version) moves the cursor more lines downward than intended.

In KateViewInternal::mouseMoveEvent() it simply won't place the cursor if scrolling, since the scrollTimeout will do it nevertheless.

ngraham edited the summary of this revision. (Show Details)Jun 24 2019, 12:11 PM
ngraham added reviewers: Kate, KTextEditor.
ngraham edited the summary of this revision. (Show Details)
cullmann accepted this revision.Jun 24 2019, 8:14 PM
cullmann added a subscriber: cullmann.

Works like a charm for me, thanks!

This revision is now accepted and ready to land.Jun 24 2019, 8:14 PM
This revision was automatically updated to reflect the committed changes.
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptJun 24 2019, 8:14 PM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript