FuncRequest req = cmd;
if (cmd.argument().empty() && !d->search_request_cache_.argument().empty())
req = d->search_request_cache_;
+ if (req.argument().empty()) {
+ theLyXFunc().dispatch(FuncRequest(LFUN_DIALOG_SHOW, "findreplace"));
+ break;
+ }
if (find(this, req))
showCursor();
else
bool BufferView::setCursorFromInset(Inset const * inset)
{
// are we already there?
- if (cursor().nextInset() == inset)
+ if (&cursor().inset() == inset || cursor().nextInset() == inset)
return true;
// Inset is not at cursor position. Find it in the document.