]> 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>
Mon, 21 Apr 2014 15:51:58 +0000 (11:51 -0400)
Fixes: #7685.
src/BufferView.cpp

index 2d3df5f8661e3a50eb231952daf874799646112d..392f380f1d248f729e23e1e08339cb5d3ff74829 100644 (file)
@@ -686,6 +686,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());
 }