[Top][All Lists]

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

Re: How is text properties stored?

From: Stefan Monnier
Subject: Re: How is text properties stored?
Date: Thu, 09 May 2019 16:40:40 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> No, positions of intervals are continuously maintained as side effect
>> of editing commands that change buffer text.
> I still don't understand how is position maintained when user inserts
> something. Say I insert some characters in interval (3), I know
> total_length of (2) and (4) are updated. But how are the positions of
> all the intervals after (3) -- (4), (5) and (6) updated? I don't see
> relevant code in adjust_intervals_for_insertion.

They're not updated at that moment.  They'll be updated when you "move"
to those other intervals: find_interval and next_interval presume that
the current interval has correct `position` info and (re)compute the
destination's `position` based on that info (and on the total_length of
the relevant intervals along the way).


reply via email to

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