From 7c3d1d7423908c4e2481f320876400622f78f359 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 5 Jun 2014 12:18:09 +0200 Subject: [PATCH] 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 --- src/lyxfind.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index 0c10e1980d..6b9556e879 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; }