void InsetMathNest::handleFont2(Cursor & cur, docstring const & arg)
{
- bool font_changed = false;
+ bool include_previous_change = false;
cur.recordUndoSelection();
Font font;
bool b;
if (font.fontInfo().color() != Color_inherit &&
font.fontInfo().color() != Color_ignore) {
handleNest(cur, MathAtom(new InsetMathColor(buffer_, true, font.fontInfo().color())));
- font_changed = true;
+ include_previous_change = true;
}
docstring im;
break;
}
if (!im.empty()) {
- if (font_changed) {
+ if (include_previous_change) {
Cursor oldcur = cur;
cur.backwardInset();
cur.resetAnchor();
}
handleNest(cur, createInsetMath(im, cur.buffer()));
im.clear();
- font_changed = true;
+ include_previous_change = true;
}
switch(font.fontInfo().series()) {
break;
}
if (!im.empty()) {
- if (font_changed) {
+ if (include_previous_change) {
Cursor oldcur = cur;
cur.backwardInset();
cur.resetAnchor();
}
handleNest(cur, createInsetMath(im, cur.buffer()));
im.clear();
- font_changed = true;
+ include_previous_change = true;
}
switch(font.fontInfo().shape()) {
break;
}
if (!im.empty() && im != "error") {
- if (font_changed) {
+ if (include_previous_change) {
Cursor oldcur = cur;
cur.backwardInset();
cur.resetAnchor();
}
handleNest(cur, createInsetMath(im, cur.buffer()));
im.clear();
- font_changed = true;
+ include_previous_change = true;
}
switch(font.fontInfo().size()) {
break;
}
if (!im.empty()) {
- if (font_changed) {
+ if (include_previous_change) {
Cursor oldcur = cur;
cur.backwardInset();
cur.resetAnchor();
}
handleNest(cur, createInsetMath(im, cur.buffer()));
im.clear();
- font_changed = true;
+ include_previous_change = true;
}
InsetMathDecoration const * d = asDecorationInset();
break;
}
if (!im.empty()) {
- if (font_changed) {
+ if (include_previous_change) {
Cursor oldcur = cur;
cur.backwardInset();
cur.resetAnchor();
}
handleNest(cur, createInsetMath(im, cur.buffer()));
im.clear();
- font_changed = true;
+ include_previous_change = true;
}
switch(font.fontInfo().uuline()) {
break;
}
if (!im.empty()) {
- if (font_changed) {
+ if (include_previous_change) {
Cursor oldcur = cur;
cur.backwardInset();
cur.resetAnchor();
}
handleNest(cur, createInsetMath(im, cur.buffer()));
im.clear();
- font_changed = true;
+ include_previous_change = true;
}
switch(font.fontInfo().uwave()) {
break;
}
if (!im.empty()) {
- if (font_changed) {
+ if (include_previous_change) {
Cursor oldcur = cur;
cur.backwardInset();
cur.resetAnchor();
}
handleNest(cur, createInsetMath(im, cur.buffer()));
im.clear();
- font_changed = true;
+ include_previous_change = true;
}
// FIXME: support other font changes here as well?