Lars Gullik BjÃnnes <[EMAIL PROTECTED]> writes:

> | <                 LCursor old = cur;
> | <                 editXY(cur, x, y - par.rows()[row].ascent() - 1);
> | <                 if (cur == old)
...
> 
> I have a feeling that the cursor used afterwards is a different
> cursor.

???

editXY() is LyXText::edXY(), no? So:

InsetBase * LyXText::editXY(LCursor & cur, int x, int y) const
{
        pit_type pit = getPitNearY(y);
        BOOST_ASSERT(pit != -1);
        Row const & row = getRowNearY(y, pit);
        bool bound = false;

        int xx = x; // is modified by getColumnNearX
        pos_type const pos = row.pos() + getColumnNearX(pit, row, xx, bound);
        cur.pit() = pit;
        cur.pos() = pos;
        cur.boundary() = bound;
        cur.x_target() = x;

How would it be possible that this code DOESNT change "cur" ?
I'm mystified ...


/Andreas


Reply via email to