From 5486beac29f2a0fd9e3576ffb27d68e6d100e955 Mon Sep 17 00:00:00 2001 From: Guillaume Munch Date: Tue, 3 May 2016 21:09:15 +0100 Subject: [PATCH] getInnerText() --- src/BufferView.cpp | 4 +--- src/mathed/InsetMathHull.cpp | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/BufferView.cpp b/src/BufferView.cpp index e5964a4492..9c19cae800 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -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()); } diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index e684d237f5..c2699f6db8 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -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); -- 2.39.5