From: Jürgen Vigna Date: Fri, 12 Apr 2002 09:02:21 +0000 (+0000) Subject: Clear the selection if we didn't find the searchstring (fix #310). X-Git-Tag: 1.6.10~19426 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=9b6fc7b6c97e24545bb7488abd9210417b7f00a1;p=features.git Clear the selection if we didn't find the searchstring (fix #310). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3980 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index 5b549f07ee..d29b664038 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2002-04-12 Juergen Vigna + * 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(). diff --git a/src/lyxfind.C b/src/lyxfind.C index fa6acb468f..7e42daca2d 100644 --- a/src/lyxfind.C +++ b/src/lyxfind.C @@ -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();