From 149778a0a5d7a407624204e9e8e575872f6bcb3f Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Sun, 10 Feb 2008 19:05:09 +0000 Subject: [PATCH] Ensure that the cursor is visible when searching text. Should fix the spellchecker and a few other bugs. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22926 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView.cpp | 1 + src/lyxfind.cpp | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 8b0d56eb93..83ed752c78 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -1730,6 +1730,7 @@ void BufferView::putSelectionAt(DocIterator const & cur, } else d->cursor_.setSelection(d->cursor_, length); } + showCursor(); } diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index 1a214589fb..043f02cde2 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -307,11 +307,9 @@ void replace(BufferView * bv, FuncRequest const & ev, bool has_deleted) } else { // if we have deleted characters, we do not replace at all, but // rather search for the next occurence - bool const found = find(bv, search, - casesensitive, matchword, forward); - - if (!found) - // emit message signal. + if (find(bv, search, casesensitive, matchword, forward)) + bv->showCursor(); + else bv->message(_("String not found!")); } } -- 2.39.5