X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FBufferView.cpp;h=b46be350b850010964b3c6322381b7dd86cda0ba;hb=2455bc258f3b62c29ec4a41cb88070ff8518e842;hp=ddbe14789a39fbdfbff8c2da58f9985a34d32fbe;hpb=4813fe32bb744e132540e67e84e22f5894d96953;p=lyx.git diff --git a/src/BufferView.cpp b/src/BufferView.cpp index ddbe14789a..b46be350b8 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -1072,9 +1072,12 @@ bool BufferView::dispatch(FuncRequest const & cmd) if (!inset || !cur.result().dispatched()) cur.dispatch(cmd); + // FIXME I'm adding the last break to solve a crash, + // but that is obviously not right. if (!cur.result().dispatched()) // It did not work too; no action needed. break; + break; } case LFUN_PARAGRAPH_GOTO: { @@ -1456,15 +1459,12 @@ bool BufferView::dispatch(FuncRequest const & cmd) InsetIterator it = inset_iterator_begin(inset); InsetIterator const end = inset_iterator_end(inset); for (; it != end; ++it) { - if (!it->asInsetMath() + if (it->asInsetCollapsable() && (inset_code == NO_CODE || inset_code == it->lyxCode())) { Cursor tmpcur = cur; tmpcur.pushBackward(*it); - FuncStatus flag; - it->getStatus(tmpcur, fr, flag); - if (flag.enabled()) - it->dispatch(tmpcur, fr); + it->dispatch(tmpcur, fr); } } processUpdateFlags(Update::Force | Update::FitCursor); @@ -1483,6 +1483,7 @@ docstring const BufferView::requestSelection() { Cursor & cur = d->cursor_; + LYXERR(Debug::SELECTION, "requestSelection: cur.selection: " << cur.selection()); if (!cur.selection()) { d->xsel_cache_.set = false; return docstring();