]> 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>
Sun, 29 May 2016 21:55:42 +0000 (17:55 -0400)
src/BufferView.cpp
src/mathed/InsetMathHull.cpp

index b2da99880a220dc0023cb9ba821fabb81b808e7d..e6a69dece6154ee98640d07a5531467d72831228 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 6fa50e44b9862aeb1cc6e9680168ae7691a37ec2..efdeb8b05623f107660f6f511a3b081960d68c90 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);