]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlSearch.C
The reference dialog now disconnects from the inset on Apply. Its behaviour
[lyx.git] / src / frontends / controllers / ControlSearch.C
index 7315d7139bc2702070a2ee5227cb3c7140c95272..9121822b8957705ff87a8f01891d00c10bde31e0 100644 (file)
@@ -58,9 +58,13 @@ void ControlSearch::find(string const & search,
 void ControlSearch::replace(string const & search, string const & replace,
                            bool casesensitive, bool matchword, bool all) const
 {
+       // If not replacing all instances of the word, then do not
+       // move on to the next instance once the present instance has been
+       // changed
+       bool const once = !all;
        int const replace_count = LyXReplace(lv_.view(),
                                             search, replace, true, casesensitive, 
-                                            matchword, all);
+                                            matchword, all, once);
                                  
        if (replace_count == 0) {
                setMinibuffer(&lv_, _("String not found!"));