-#if 0
- } else if (text->inset_owner) {
- // test if we're inside an inset if yes unlock the inset
- // and recall us with the outside LyXText!
- bv->unlockInset((UpdatableInset *)text->inset_owner);
- if (!bv->theLockingInset()) {
- text = bv->getLyXText();
- par = text->cursor.par();
- pos = text->cursor.pos();
- if (pos < par->size() - 1)
- ++pos;
- else {
- pos = 0;
- par = par->next();
- }
- if (!par)
- return SR_NOT_FOUND;
- text->setCursor(bv, par, pos);
- return SearchForward(bv, text, str, cs, mw);
- } else {
- return SR_NOT_FOUND;
- }
-#endif
- } else
+ } else {
+ // make sure we end up at the end of the text,
+ // not the start point of the last search
+ text->setCursor(bv, prev_par, prev_pos);