emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Request for pointers and advice: displaying several buffers inside a


From: Eli Zaretskii
Subject: Re: Request for pointers and advice: displaying several buffers inside a single window
Date: Sat, 11 Apr 2020 10:34:08 +0300

> From: Ihor Radchenko <address@hidden>
> Cc: address@hidden, address@hidden, address@hidden,
>  address@hidden
> Date: Sat, 11 Apr 2020 03:34:30 +0800
> 
> > And what do you suggest to do with the gap?
> 
> This is where the buffer text is stored internally right?

That's not the definition I'd use.  The gap is a way of making text
insertion less expensive.  If you insert characters one by one, each
insertion needs to move the characters after the insertion point,
which is expensive.  Having the gap allows us to perform this movement
only after relatively large amounts of text were inserted; for smaller
insertions we just make the gap smaller.

> I think a
> "segment" may as well refer to a substring from the gap. In the simplest
> case the list of "segments" would contain a single element referring to
> the whole gap. Then, if one adds another "segment", the list will hold 3
> elements: (<segment from beginning of the gap to pos> <added segment>
> <segment referring to the remaining part of the gap>).

My question was how you handle insertion in a segment?  Move the gap
to the segment, or have a separate gap for each segment?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]