How does kate / kwrite store text internally

Waqar Ahmed waqar.17a at gmail.com
Tue May 17 15:55:54 BST 2022


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 <rhkramer at gmail.com> 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!


More information about the KWrite-Devel mailing list