]> git.lyx.org Git - features.git/commitdiff
Fix crash when accepting change
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 5 Jun 2014 10:18:09 +0000 (12:18 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 5 Jun 2014 10:51:40 +0000 (12:51 +0200)
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
src/lyxfind.cpp
status.21x

index b30c0694e1bf56bea1cdb82ac4877db8551c4c0e..33c56d1ba1aabe0951e639ddb90574ba6be4715a 100644 (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;
                }
 
index 7c4e96275d8ced755d1b2658fee8098b97d65206..97fc3779778537768c4b10d32a417a60a1c0fa70 100644 (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.