mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +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.
|
||||
*/
|
||||
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);
|
||||
break;
|
||||
|
||||
case LFUN_WORD_FIND:
|
||||
if (find(this, cmd))
|
||||
case LFUN_WORD_FIND: {
|
||||
FuncRequest req = cmd;
|
||||
if (cmd.argument().empty() && !d->search_request_cache_.argument().empty())
|
||||
req = d->search_request_cache_;
|
||||
if (find(this, req))
|
||||
showCursor();
|
||||
else
|
||||
message(_("String not found!"));
|
||||
d->search_request_cache_ = req;
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_WORD_REPLACE: {
|
||||
bool has_deleted = false;
|
||||
|
Loading…
Reference in New Issue
Block a user