From: Jean-Marc Lasgouttes Date: Thu, 5 Jun 2014 10:18:09 +0000 (+0200) Subject: Fix crash when accepting change X-Git-Tag: 2.1.1~28 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=3544ce4a4ee9fb788ccaeae9cf1bb6e6c16b7997;p=features.git Fix crash when accepting change The problem is the use of cursor movement methods to update cursor. Cursor::forwardPos() steps into insets, which is not always what we want. The problem here is that there is a math inset just after the accepted change, and that the cursor steps into it for some reason. This code is a nightmare anyway. Fixes: bug #9145 --- diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index b30c0694e1..33c56d1ba1 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -400,7 +400,7 @@ bool findChange(DocIterator & cur, bool next) if (!next) // if we search backwards, take a step forward // to correctly set the anchor - cur.forwardPos(); + cur.top().forwardPos(); return true; } diff --git a/status.21x b/status.21x index 7c4e96275d..97fc377977 100644 --- a/status.21x +++ b/status.21x @@ -62,6 +62,8 @@ What's new - Fix assertion when selecting in document with bi-directional text (bug 9142). +- Fix assertion when accepting change (bug 9145). + - Fix LaTeX error with alphabetic delimiters in inline Listings (part of bug 8985). @@ -80,22 +82,23 @@ What's new * LYX2LYX -- We have fixed several significant issues involving conversion of 2.0 format - into 2.1 format, and conversely. This mostly affects the new argument insets - and, in particular, beamer documents. These are detailed below. +We have fixed several significant issues involving conversion of 2.0 + format into 2.1 format, and conversely. This mostly affects the new + argument insets and, in particular, beamer documents. These are + detailed below. - Fix conversion of beamer block titles ending with non-ERT insets to 2.1 format. - Fix conversion of beamer blocks with preceding or trailing blanks. -- Add \justification parameter when converting to 2.1 format (avoids when - converting back to 2.0 format). +- Add \justification parameter when converting to 2.1 format (avoids + warning when converting back to 2.0 format). - Fix conversion of argument insets from 2.1 to 2.0 format. -- Fix use math package settings conversion from 2.1 to 2.0 format. +- Fix "use math package" settings conversion from 2.1 to 2.0 format. -- Fix use math package settings conversion from 2.0 to 2.1 format (bug 9069). +- Fix "use math package" settings conversion from 2.0 to 2.1 format (bug 9069). - Fix table cell rotation conversion from 2.1 to 2.0 format.