Subject: bug#56682: locked narrowing

From: Stefan Monnier <[email-masked]>
Date: Fri, 02 Dec 2022 09:13:46 -0500

> I'm not sure I understand how that would work, concretely.  After the
> initial scan, we would have beg=BEG / end=Z.

No, after the initial the BEG..END region would be empty (since
BEG..END represents the part of the buffer *not yet* scanned).

> Now the buffer is modified,
> say 1000 characters are added at position 1000 and 10000 characters are
> added at position 10000.  What would be the values of beg and end after
> these two operations?

BEG=1000 and END=20000.

> The two portions of the buffer that did not change are BEG .. 1000 and
> 20000 .. Z, so it seems to me that it's better to keep track of the
> portion of the buffer that did change, in this case 1000 .. 20000.

That's exactly what I'm suggesting.

        Stefan