Andre Poenitz wrote:

> On Thu, Oct 30, 2003 at 05:26:11PM +0100, Alfredo Braunstein wrote:
>> Angus Leeming wrote:
>> 
>> > Note that multiple BufferViews implies multiple Cursors. I'm sure
>> > that I would be pissed off if I replaced "brown" with "red" in
>> > one window and found that the cursor in my other BufferView had
>> > also changed position.
>> 
>> That's a very good point.
> 
> But if in the second view there's no 'brown' anymore, it seems to be
> reasonable not to have the cursor positioned on the non-existing
> 'brown'...

I think you're mis-quoting me. The example was:
"The quick brown fox jumped over the |lazy dog."

Replace 'brown' with 'red' and leave the cursor before 'lazy'.

The problem, of course, is that the text is stored in a std::vector 
and insert and erase operations invalidate all iterators. Thus, the 
iterators (cursors) must somehow be regenerated after the 
erase/insert operation. Things get messy when there are multiple 
BufferViews, each with their own cursor.

-- 
Angus

Reply via email to