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

List:       kwrite-devel
Subject:    Re: How does kate / kwrite store text internally
From:       Waqar Ahmed <waqar.17a () gmail ! com>
Date:       2022-05-17 14:55:54
Message-ID: CAPesRH68KfYco4h4ZBJjy_xMv9E-xo+KzbeTNLZ9+2RwtcGJ=w () mail ! gmail ! com
[Download RAW message or body]

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@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!
[prev in list] [next in list] [prev in thread] [next in thread] 

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