]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfind.C
Painter and scrollbar API patches
[lyx.git] / src / lyxfind.C
index fa6acb468fb2962dacf05f498e971a09e53ed288..72784eff1aa02e59f4b74c33c7881296c18cfd7b 100644 (file)
@@ -6,7 +6,7 @@
 
 #include "lyxtext.h"
 #include "lyxfind.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "frontends/Alert.h"
 #include "support/textutils.h"
 #include "support/lstrings.h"
@@ -176,9 +176,12 @@ bool LyXFind(BufferView * bv,
                bv->getLyXText()->setSelectionOverString(bv, searchstr);
                bv->toggleSelection(false);
                bv->update(bv->getLyXText(), BufferView::SELECT|BufferView::FITCUR);
-       } else if (result == SR_NOT_FOUND)
+       } else if (result == SR_NOT_FOUND) {
+               bv->toggleSelection();
+               bv->getLyXText()->clearSelection();
+               bv->update(bv->getLyXText(), BufferView::SELECT|BufferView::FITCUR);
                found = false;
-
+       }
        if (bv->focus())
                bv->showCursor();