mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
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
This commit is contained in:
parent
2588a92167
commit
9b6fc7b6c9
@ -1,5 +1,7 @@
|
||||
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().
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user