resetting find position

Leo Savernik l.savernik at aon.at
Thu Oct 16 09:50:02 BST 2003


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

Hello,

khtml's find is broken in caret mode. So I attempted to fix it to behave like 
find in kate. In KHTMLPart::findTextNext I set the (m_findNode, m_findPos) 
pair to (caretNode(), caretOffset()). However, this doesn't work reliably.

On active caret mode, when pressing "Find" in the dialog, the first result is 
highlighted. Then I move the caret *before* the first match, and press 
"Find". Actually, the same match should be highlighted again. But instead the 
match *after* that match is highlighted as if the caret were never 
repositioned.

Only sometimes the find position is correctly initialized with the caret 
position.

See the attached patch for reference (sorry, this patch is not cleaned up).

mfg
	Leo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE/jlu6j5jssenUYTsRArJIAJ0dznIaDUCnIt9GxbtVIELwgd2eegCgsecn
seRcJtCU7vWE+ukgWYzmwZU=
=XO+9
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: khtml_navigation_38.diff
Type: text/x-diff
Size: 2650 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20031016/a092f000/attachment.diff>


More information about the kfm-devel mailing list