The branch, master, has been updated. - Log -----------------------------------------------------------------
commit 418e884680ceee09934359053f072aa8d91f07e8 Author: Jean-Marc Lasgouttes <lasgout...@lyx.org> Date: Sat Apr 27 11:19:19 2013 +0200 Fix assertion related to cursor anchor. diff --git a/src/Cursor.cpp b/src/Cursor.cpp index 3ca6163..2820877 100644 --- a/src/Cursor.cpp +++ b/src/Cursor.cpp @@ -1139,14 +1139,12 @@ CursorSlice Cursor::normalAnchor() const { if (!selection()) return top(); - if (anchor_.depth() >= depth()) { - // LASSERT: There have been several bugs around this code, that seem - // to involve failures to reset the anchor. We can at least not crash - // in release mode by resetting it ourselves. - LASSERT(false, /* */); - DocIterator & di = const_cast<DocIterator &>(anchor_); - di = *this; - } + // LASSERT: There have been several bugs around this code, that seem + // to involve failures to reset the anchor. We can at least not crash + // in release mode by resetting it ourselves. + LASSERT(anchor_.depth() >= depth(), + const_cast<DocIterator &>(anchor_) = *this); + CursorSlice normal = anchor_[depth() - 1]; if (depth() < anchor_.depth() && top() <= normal) { // anchor is behind cursor -> move anchor behind the inset ----------------------------------------------------------------------- Summary of changes: src/Cursor.cpp | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) hooks/post-receive -- The LyX Source Repository