* BufferView.cpp (setCursorFromInset): do not ignore the first inset
of the document; revert first tentative patch for this bug.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26645
a592a061-630c-0410-9148-
cb99ea01b6c8
bool BufferView::setCursorFromInset(Inset const * inset)
{
// are we already there?
- if (&cursor().inset() == inset || cursor().nextInset() == inset)
+ if (cursor().nextInset() == inset)
return true;
// Inset is not at cursor position. Find it in the document.
Cursor cur(*this);
cur.reset(buffer().inset());
- do
+ while (cur && cur.nextInset() != inset)
cur.forwardInset();
- while (cur && cur.nextInset() != inset);
if (cur) {
setCursor(cur);