> 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. ----- (4) --- / | \ - (2) - | - (6) / | \ | / | (1) (2) (3) (4) (5) (6) Sincerely, Yuan