[EMAIL PROTECTED] (Lars Gullik Bjønnes) writes: | Andreas Vox <[EMAIL PROTECTED]> writes: > | | Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: >> >>> >>> This is making life hard for me. >> | | < bool LyXText::cursorUp(LCursor & cur) | | < { | | < Paragraph const & par = cur.paragraph(); | | < int const row = par.pos2row(cur.pos()); | | < int const x = cur.targetX(); | | < | | < if (!cur.selection()) { | | < lyxerr << BOOST_CURRENT_FUNCTION | | < << "Cursor up, no selection" << endl; | | < | | < int const y = bv_funcs::getPos(cur).y_; | | < LCursor old = cur; | | < editXY(cur, x, y - par.rows()[row].ascent() - 1); | | < if (cur == old) | | { | | < lyxerr << BOOST_CURRENT_FUNCTION | | < << " cur and old ARE EQUAL!\n" | | < << "old: " << old <<'\n' | | < << "cur: " << cur << endl; | | } | | < | | < return deleteEmptyParagraphMechanism(cur, old); | | < } | | ... | | < an extra space between to words and press 'up'. The cursor now moves | | < out of the inset and into the line above. Fine and dandy. This is done | | < by hte editXY in the code above. However, what is not so fine is that | | < old == cur even after this, so DEPM ends up doing nothing and we are | | < left with a double-space. >> | | But if everything is fine and dandy, cur MUST have changed, no? > | I have a feeling that the cursor used afterwards is a different | cursor.
But I found a solution. Not really nice, but it works and involves dummy cursors with artificial changes. I'll send an updated patch. -- Lgb