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
This commit is contained in:
Jean-Marc Lasgouttes 2014-06-05 12:18:09 +02:00
parent fff454fa4b
commit 3544ce4a4e
2 changed files with 11 additions and 8 deletions

View File

@ -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;
}

View File

@ -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.