[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: File not read completely when opening?
From:       Christoph Cullmann <cullmann () babylon2k ! de>
Date:       2003-02-06 21:26:09
[Download RAW message or body]

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

On Thursday 06 February 2003 15:57, Andras Mantia wrote:
> Hi,
>
>  I experience a strange bug in some days old HEAD (I cannot test with
> branch) with the Kate part. Afteropen eg. a 2000 line long document, which
> is about 200KB, the EditInterface::numLines() returns only 340, and the
> EditInterface::text() returns a string with about 35000 chars instead of
> 210.000+. If I wait a little and check the numLines() again, it returns
> correctly the 2000 and the text() returns the content of the whole
> document. I use a code like:
>
> if (doc->openUrl(url)
> {
>   cout << dynamic_cast<KTextEditor::EditInterface *>(doc)->numLines;
> }
>
> doc is a KTextEditor::Document*.
>
> I've tried with two big files, and the results was similar: numLines
> returns around 540 and the text() is around 35000 chars long.
>
> Is this a bug in the kate part?
No, that is intensional, the part loads the data in chunks and not at once.

- -- 
Christoph Cullmann
KDE Developer, kde.org Co-Maintainer
http://www.babylon2k.de, cullmann@kde.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+QtL0yPjDGePm9UIRAkwLAJ44DyAiuD9rvEBPIgCzdcnsQlQxNwCg1lg6
psrg5V9Dpkhf1L9k9/UFpi0=
=euWf
-----END PGP SIGNATURE-----

_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic