mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-14 06:57:01 +00:00
Make Richard happy (Find Next via LFUN_WORD_FIND).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23983 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2886b49360
commit
89a58051e1
@ -263,6 +263,9 @@ struct BufferView::Private
|
|||||||
/** Not owned, so don't delete.
|
/** Not owned, so don't delete.
|
||||||
*/
|
*/
|
||||||
frontend::GuiBufferViewDelegate * gui_;
|
frontend::GuiBufferViewDelegate * gui_;
|
||||||
|
|
||||||
|
/// Cache for Find Next
|
||||||
|
FuncRequest search_request_cache_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -1182,12 +1185,17 @@ bool BufferView::dispatch(FuncRequest const & cmd)
|
|||||||
buffer_.text().acceptOrRejectChanges(d->cursor_, Text::REJECT);
|
buffer_.text().acceptOrRejectChanges(d->cursor_, Text::REJECT);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LFUN_WORD_FIND:
|
case LFUN_WORD_FIND: {
|
||||||
if (find(this, cmd))
|
FuncRequest req = cmd;
|
||||||
|
if (cmd.argument().empty() && !d->search_request_cache_.argument().empty())
|
||||||
|
req = d->search_request_cache_;
|
||||||
|
if (find(this, req))
|
||||||
showCursor();
|
showCursor();
|
||||||
else
|
else
|
||||||
message(_("String not found!"));
|
message(_("String not found!"));
|
||||||
|
d->search_request_cache_ = req;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case LFUN_WORD_REPLACE: {
|
case LFUN_WORD_REPLACE: {
|
||||||
bool has_deleted = false;
|
bool has_deleted = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user