]> git.lyx.org Git - features.git/commitdiff
Fixed 2 more problems with s+r. This fixes #482.
authorJürgen Vigna <jug@sad.it>
Fri, 26 Jul 2002 09:50:16 +0000 (09:50 +0000)
committerJürgen Vigna <jug@sad.it>
Fri, 26 Jul 2002 09:50:16 +0000 (09:50 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4792 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/insets/ChangeLog
src/insets/insettabular.C
src/lyxfind.C

index e71021c512d04281b41b51eb1b51ebb523c99c12..70138f645f1249400b25ccca67a0e5f87a56d412 100644 (file)
@@ -1,3 +1,8 @@
+2002-07-26  Juergen Vigna  <jug@sad.it>
+
+       * lyxfind.C (LyXReplace): we have to check better if the returned
+       text is not of theLockingInset()->getLockingInset().
+
 2002-07-25  Juergen Vigna  <jug@sad.it>
 
        * lyxfind.C (LyXReplace): don't replace if we don't get the
index 373bc186a07dfd94a56f143bcb3945873683999f..2222e9549bb999bd4fe20d27d29f25267e5a5aeb 100644 (file)
@@ -1,3 +1,8 @@
+2002-07-26  Juergen Vigna  <jug@sad.it>
+
+       * insettabular.C (searchForward): check for lastcell if we
+       had a locking inset.
+
 2002-07-25  Juergen Vigna  <jug@sad.it>
 
        * insettabular.C (insetMotionNotify): Don't update the screen
index 2f093054a46d23b4a0865bb80229c751b1998551..86c2c3bd917784a6a6acd3f0ed53ce5c18cbe0a5 100644 (file)
@@ -2752,6 +2752,9 @@ bool InsetTabular::searchForward(BufferView * bv, string const & str,
                        updateLocal(bv, CELL, false);
                        return true;
                }
+               if (tabular->IsLastCell(actcell))
+                       return false;
+               ++actcell;
        }
        InsetText * inset = tabular->GetCellInset(actcell);
        if (inset->searchForward(bv, str, cs, mw)) {
index 4275b085b19372f6ea4f1f13cacfc9fb02456aad..de0857924fa21af12d56f6278f5f977aa056c233 100644 (file)
@@ -14,6 +14,7 @@
 #include "buffer.h"
 #include "debug.h"
 #include "gettext.h"
+#include "insets/insettext.h"
 
 using lyx::pos_type;
 
@@ -85,7 +86,12 @@ int LyXReplace(BufferView * bv,
        int replace_count = 0;
        do {
                text = bv->getLyXText();
-               if (!bv->theLockingInset() || text != bv->text) {
+               // We have to do this check only because mathed insets don't
+               // return their own LyXText but the LyXText of it's parent!
+               if (!bv->theLockingInset() ||
+                       ((text != bv->text) &&
+                        (text->inset_owner == text->inset_owner->getLockingInset())))
+               {
                        bv->hideCursor();
                        bv->update(text, BufferView::SELECT|BufferView::FITCUR);
                        bv->toggleSelection(false);