[PATCH] Fix for PageUp/PageDown in KTextEdit

Michael Leupold lemma at confuego.org
Thu Mar 26 00:37:31 GMT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Faure wrote:

> On Wednesday 25 March 2009, Michael Leupold wrote:
>> Hi,
>> 
>> 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).
> 
> If this fixes the weird scrolling in the kmail composer window, I'm all
> for it ;)

It should fix that you can watch the cursor crawl on hitting page-up, page-
down. We tried to reproduce the other scrolling issue (only the first line 
changes, the others stay the same until scrolling is done) but couldn't - so 
that's probably already fixed in trunk.

Regards,
Michael

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFJys5LlfpzINIAlVsRAv+BAJ9xuOaxfu1HwQJviz5YFky/OoJZzwCcCzsV
y1l2qFdGbwlcp+YkfSAr+D8=
=yX2P
-----END PGP SIGNATURE-----






More information about the kde-core-devel mailing list