]> git.lyx.org Git - features.git/commitdiff
getInnerText()
authorGuillaume Munch <gm@lyx.org>
Tue, 3 May 2016 20:09:15 +0000 (21:09 +0100)
committerRichard Heck <rgheck@lyx.org>
Wed, 15 Jun 2016 21:32:53 +0000 (22:32 +0100)
src/BufferView.cpp
src/mathed/InsetMathHull.cpp

index e5964a4492361d7cb6db0d2b6dea3af90a07b0be..9c19cae800264ae59f1c06fa0c4f5d8931cf1184 100644 (file)
@@ -707,9 +707,7 @@ Change const BufferView::getCurrentChange() const
 
        DocIterator dit = d->cursor_.selectionBegin();
        // The selected content might have been changed (see #7685)
-       while (dit.inMathed())
-               // Find enclosing text cursor
-               dit.pop_back();
+       dit = dit.getInnerText();
        return dit.paragraph().lookupChange(dit.pos());
 }
 
index e684d237f5547fe487ec66d743c9a4be10669ab4..c2699f6db84c940e123625186ce431c46c5d57ff 100644 (file)
@@ -750,9 +750,7 @@ void InsetMathHull::preparePreview(DocIterator const & pos,
                macro_preamble.append(*it);
 
        // set the font series and size for this snippet
-       DocIterator dit = pos;
-       while (dit.inMathed())
-               dit.pop_back();
+       DocIterator dit = pos.getInnerText();
        Paragraph const & par = dit.paragraph();
        Font font = par.getFontSettings(buffer->params(), dit.pos());
        font.fontInfo().realize(par.layout().font);