bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#56682: locked narrowing


From: Stefan Monnier
Subject: bug#56682: locked narrowing
Date: Thu, 01 Dec 2022 18:48:26 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

Maybe another option is to do the scan more lazily, keeping track more
precisely of what was scanned and/or needs rescanning.

Do an initial scan on the whole buffer and after that keep a BEG..END
limit approximating the region that has been modified since the last scan.

As long as

   END - BEG < LINE_LENGTH_THRESHOLD - MAX_SEEN_LINE_LENGTH

then we know we don't need to rescan anything at all.  And when we do
need to rescan we can limit the scan to

   BEG - MAX_SEEN_LINE_LENGTH ... END + MAX_SEEN_LINE_LENGTH

I assume here that we would remember the MAX_SEEN_LINE_LENGTH.


        Stefan






reply via email to

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