Re: How does kate / kwrite store text internally

Waqar Ahmed <[email protected]>
Newsgroups gmane.comp.kde.devel.kwrite
Message-ID <CAPesRH68KfYco4h4ZBJjy_xMv9E-xo+KzbeTNLZ9+2RwtcGJ=w@mail.gmail.com>
Kate doesn't use any fancy data structure. Internally its an array of
blocks where each block contains a certain number of lines. You can
take a look at the code inside src/buffer directory of KTextEditor to
see how it works internally.

On Tue, May 17, 2022 at 7:37 PM <[email protected]> wrote:
>
> Mostly out of idle curiosity, I'd like to find out how kate / kwrite store text
> internally -- I mean a gapped buffer, a piece table, some (other) kind of tree,
> ...
>
> For extra credit ;-) is there any document that tells how that was decided and
> / or compares it to alternate methods?
>
> (Aside: Scintilla uses a gapped buffer with some auxillary structures (like a
> separate style buffer, maybe others), Iiuc, Microsoft Word uses some kind of
> tree.)
>
> I have tried some Google searches, but no luck so far.
>
> Thanks!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.