From 9b6fc7b6c97e24545bb7488abd9210417b7f00a1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Vigna?= Date: Fri, 12 Apr 2002 09:02:21 +0000 Subject: [PATCH] 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 --- src/ChangeLog | 2 ++ src/lyxfind.C | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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(); -- 2.39.2