On Mon, Feb 02, 2004 at 11:07:56AM +0100, Alfredo Braunstein wrote:
> in favour of BufferView::setCursor(ParIterator &, lyx::pos_type)
> 
> The lockPath name is really out of context now (remember *lock* ;-) ? ) and
> it doesn't belong really to ParIterator.
> 
> Ok to go in?

Looks good.

> +void BufferView::setCursor(ParIterator const & par,
> +                          lyx::pos_type pos)
> +{
> +       LCursor & cur = cursor();
> +       cur.reset();
> +       ParIterator::PosHolder const & positions = par.positions();
> +       int const last = par.size() - 1;
> +       for (int i = 0; i < last; ++i)
> +               (*positions[i].it)->inset->edit(cur, true);
> +       cur.resetAnchor();
> +       LyXText * lt = par.text(*buffer());
> +       lt->setCursor(par.pit(), pos);
> +}

I wonder whether an CursorBase could replace that ParIterator/pos_type
combo at some point of time...

Andre'

[Btw: An assert in LyXText::cursor() already crashes on File->New.
I wonder whether there ever was some non-chaotic system for the order of
initializing things in this area...]

Reply via email to