]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfind.C
Point fix, earlier forgotten
[lyx.git] / src / lyxfind.C
index afc50357e892dec4c9ee811468d2d25c3d59653d..fe37598adb0a24526c7145427b938958053c54a6 100644 (file)
@@ -1,3 +1,15 @@
+/**
+ * \file lyxfind.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Lars Gullik Bjønnes
+ * \author John Levon
+ * \author Jürgen Vigna
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
 #include <config.h>
 
 #include "lyxtext.h"
@@ -177,10 +189,10 @@ int replace(BufferView * bv,
        string str2;
        if (casesens) {
                str1 = searchstr;
-               str2 = text->selectionAsString(bv->buffer(), false);
+               str2 = text->selectionAsString(*bv->buffer(), false);
        } else {
                str1 = lowercase(searchstr);
-               str2 = lowercase(text->selectionAsString(bv->buffer(), false));
+               str2 = lowercase(text->selectionAsString(*bv->buffer(), false));
        }
        if (str1 != str2) {
                if (!find(bv, searchstr, fw, casesens, matchwrd) ||
@@ -208,7 +220,6 @@ int replace(BufferView * bv,
 
        // FIXME: should be called via an LFUN
        bv->buffer()->markDirty();
-       bv->fitCursor();
        bv->update();
 
        return replace_count;
@@ -263,7 +274,6 @@ bool find(BufferView * bv,
                bv->unlockInset(bv->theLockingInset());
                found = false;
        }
-       bv->fitCursor();
        bv->update();
 
        return found;
@@ -397,7 +407,6 @@ bool findNextChange(BufferView * bv)
                found = false;
        }
 
-       bv->fitCursor();
        bv->update();
 
        return found;