]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfind.cpp
Comment.
[lyx.git] / src / lyxfind.cpp
index 1a214589fb8de38061300f0d832f2e1aa225afc9..bb53c35854739da4d9138dd7785bcdb38430b352 100644 (file)
@@ -22,9 +22,7 @@
 #include "buffer_funcs.h"
 #include "BufferView.h"
 #include "Changes.h"
-#include "support/debug.h"
 #include "FuncRequest.h"
-#include "support/gettext.h"
 #include "Text.h"
 #include "Paragraph.h"
 #include "ParIterator.h"
@@ -32,7 +30,9 @@
 #include "frontends/alert.h"
 
 #include "support/convert.h"
+#include "support/debug.h"
 #include "support/docstream.h"
+#include "support/gettext.h"
 #include "support/lstrings.h"
 
 using namespace std;
@@ -307,11 +307,9 @@ void replace(BufferView * bv, FuncRequest const & ev, bool has_deleted)
        } else {
                // if we have deleted characters, we do not replace at all, but
                // rather search for the next occurence
-               bool const found = find(bv, search,
-                                       casesensitive, matchword, forward);
-
-               if (!found)
-                       // emit message signal.
+               if (find(bv, search, casesensitive, matchword, forward))
+                       bv->showCursor();
+               else
                        bv->message(_("String not found!"));
        }
 }