navigation to inside insets. Someone finish this patch purleaassse, this
bug is too old by now.

I don't know why the cursor fucks up, and especially why the inset opening
doesn't get rendered (I've tried various random permutations of updateInset(),
bv->update() etc.)

regards
john


Index: text2.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text2.C,v
retrieving revision 1.195
diff -u -r1.195 text2.C
--- text2.C     2002/01/13 17:28:42     1.195
+++ text2.C     2002/01/14 03:08:44
@@ -2184,21 +2184,11 @@
        InsetText * it = static_cast<InsetText *>(par->inInset());
        if (it) {
                if (it != inset_owner) {
-                       lyxerr << "InsetText   is " << it << endl;
-                       lyxerr << "inset_owner is " << inset_owner << endl;
-#warning I believe this code is wrong. (Lgb)
-#warning Jürgen, have a look at this. (Lgb)
-#warning Hmmm, I guess you are right but we
-#warning should verify when this is needed
-                       // Jürgen, would you like to have a look?
-                       // I guess we need to move the outer cursor
-                       // and open and lock the inset (bla bla bla)
-                       // stuff I don't know... so can you have a look?
-                       // (Lgb)
-                       // I moved the lyxerr stuff in here so we can see if
-                       // this is actually really needed and where!
-                       // (Jug)
-                       // it->getLyXText(bview)->setCursorIntern(bview, par, pos, 
setfont, boundary);
+                       // enter our inset first to get the right LyXText (bug #6)
+                       it->open(bview);
+                       bview->lockInset(it);
+                       it->getLyXText(bview)->setCursor(bview, par, pos, setfont, 
+boundary);
+                       bview->update(bview->text, 
+BufferView::FITCUR|BufferView::UPDATE);
                        return;
                }
        }

Reply via email to