[PATCH] Fix for PageUp/PageDown in KTextEdit

David Faure faure at kde.org
Mon Mar 30 23:21:25 BST 2009

On Monday 30 March 2009, Michael Leupold wrote:
> Michael Leupold wrote:
> > On hitting PageUp/-Down in KTextEdit it pages by moving the cursor line by
> > line. This mimicks QTextEdit's behaviour with one small difference:
> > QTextEdit calculates the new cursor position and then sets it at the end.
> > KTextEdit sets the cursor position repeatedly line by line. This emits one
> > cursorPositionChanged() signal per line and can make applications showing
> > the cursor position feel slower than need be (eg. the KMail composer
> > window).
> >
> > This patch copies QTextEdit's behaviour. I'm unsure if there could be
> > regressions due to this change in behaviour but if there are those
> > applications should be fixed rather than not committing this patch (as
> > it's pretty hard to block that signal when scrolling starts).
> Sorry I have to poke, but could someone please review?

Yes, not calling movePosition+setTextCursor in a loop sounds like a good move, please commit.

David Faure, faure at kde.org, sponsored by Qt Software @ Nokia to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).

More information about the kde-core-devel mailing list