X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FCursor.cpp;h=7afefcf372e3b7cd26558c69af60f8dd28ecf55d;hb=3af906e9f3466265718e10ad3d772f477990901d;hp=6412c0e2f712869bdcd8f5d98fb00f8908fd7d07;hpb=52ce0ff49a0f9a5c33459428b2fdffa24febafce;p=lyx.git diff --git a/src/Cursor.cpp b/src/Cursor.cpp index 6412c0e2f7..7afefcf372 100644 --- a/src/Cursor.cpp +++ b/src/Cursor.cpp @@ -322,6 +322,7 @@ DocIterator CursorData::selectionEnd() const if (di.depth() > depth()) { di.resize(depth()); ++di.pos(); + di.boundary(true); } return di; } @@ -2041,7 +2042,7 @@ bool Cursor::mathForward(bool word) while (pos() < lastpos() && mc == nextMath().mathClass()); } else if (openable(nextAtom())) { InsetMathScript const * n = nextMath().asScriptInset(); - bool to_brace_deco = n + bool to_brace_deco = n && !n->nuc().empty() && n->nuc().back()->lyxCode() == MATH_DECORATION_CODE && n->nuc().back()->mathClass() == MC_OP; // single step: try to enter the next inset @@ -2095,7 +2096,7 @@ bool Cursor::mathBackward(bool word) } } else if (openable(prevAtom())) { InsetMathScript const * p = prevMath().asScriptInset(); - bool to_brace_deco = p + bool to_brace_deco = p && !p->nuc().empty() && p->nuc().back()->lyxCode() == MATH_DECORATION_CODE && p->nuc().back()->mathClass() == MC_OP; // single step: try to enter the preceding inset