]> git.lyx.org Git - features.git/commitdiff
Do not crash when entering math in ct mode with merge dialog open.
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 23 Mar 2014 08:52:32 +0000 (09:52 +0100)
committerRichard Heck <rgheck@lyx.org>
Fri, 18 Apr 2014 14:52:47 +0000 (10:52 -0400)
Fixes: #7685.
src/BufferView.cpp
status.21x

index 7555f78633dd11b10e299018fcc2d80d17c51de5..1398a110d510faf66577abdda75625417bd3de87 100644 (file)
@@ -684,6 +684,10 @@ Change const BufferView::getCurrentChange() const
                return Change(Change::UNCHANGED);
 
        DocIterator dit = d->cursor_.selectionBegin();
+       // The selected content might have been changed (see #7685)
+       while (dit.inMathed())
+               // Find enclosing text cursor
+               dit.pop_back();
        return dit.paragraph().lookupChange(dit.pos());
 }
 
index 18744c420112163453b5ebdc18b70706eef3e218..313985f3dbd3ec0fcd09ace34096635d64ab78b4 100644 (file)
@@ -60,6 +60,9 @@ What's new
 
 * USER INTERFACE
 
+- Fix crash when entering math in change-tracking mode while merge changes
+  dialog is open (bug 7685).
+
 - Failed instant preview compilation now returns an error. And a red box is 
   drawn around very small preview imagines, so they can be seen (bug 7522).