2002-04-12 Juergen Vigna <jug@sad.it>
+ * lyxfind.C (LyXFind): clear the former selection if not found!
+
* text2.C (insertInset): freeze Undo after setUndo so that it is not
again called in insertChar().
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();