]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.cpp
Do not crash when entering math in ct mode with merge dialog open.
[lyx.git] / 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());
 }