]> git.lyx.org Git - features.git/commitdiff
Amend 58103cf2
authorEnrico Forestieri <forenr@lyx.org>
Wed, 8 Nov 2023 07:56:40 +0000 (08:56 +0100)
committerEnrico Forestieri <forenr@lyx.org>
Wed, 8 Nov 2023 07:56:40 +0000 (08:56 +0100)
Give a variable a more meaningful name and fix a typo.

src/mathed/InsetMathNest.cpp
src/mathed/InsetMathTextsize.cpp

index e3572a189524f9311c97a097759ab6e8d3b6c882..d1b033bbd2796a641bbd2cdf86e4a3dec98277d4 100644 (file)
@@ -511,7 +511,7 @@ void InsetMathNest::handleNest(Cursor & cur, MathAtom const & nest,
 
 void InsetMathNest::handleFont2(Cursor & cur, docstring const & arg)
 {
-       bool font_changed = false;
+       bool include_previous_change = false;
        cur.recordUndoSelection();
        Font font;
        bool b;
@@ -519,7 +519,7 @@ void InsetMathNest::handleFont2(Cursor & cur, docstring const & arg)
        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;
@@ -559,7 +559,7 @@ void InsetMathNest::handleFont2(Cursor & cur, docstring const & arg)
                break;
        }
        if (!im.empty()) {
-               if (font_changed) {
+               if (include_previous_change) {
                        Cursor oldcur = cur;
                        cur.backwardInset();
                        cur.resetAnchor();
@@ -568,7 +568,7 @@ void InsetMathNest::handleFont2(Cursor & cur, docstring const & arg)
                }
                handleNest(cur, createInsetMath(im, cur.buffer()));
                im.clear();
-               font_changed = true;
+               include_previous_change = true;
        }
 
        switch(font.fontInfo().series()) {
@@ -587,7 +587,7 @@ void InsetMathNest::handleFont2(Cursor & cur, docstring const & arg)
                break;
        }
        if (!im.empty()) {
-               if (font_changed) {
+               if (include_previous_change) {
                        Cursor oldcur = cur;
                        cur.backwardInset();
                        cur.resetAnchor();
@@ -596,7 +596,7 @@ void InsetMathNest::handleFont2(Cursor & cur, docstring const & arg)
                }
                handleNest(cur, createInsetMath(im, cur.buffer()));
                im.clear();
-               font_changed = true;
+               include_previous_change = true;
        }
 
        switch(font.fontInfo().shape()) {
@@ -625,7 +625,7 @@ void InsetMathNest::handleFont2(Cursor & cur, docstring const & arg)
                break;
        }
        if (!im.empty() && im != "error") {
-               if (font_changed) {
+               if (include_previous_change) {
                        Cursor oldcur = cur;
                        cur.backwardInset();
                        cur.resetAnchor();
@@ -634,7 +634,7 @@ void InsetMathNest::handleFont2(Cursor & cur, docstring const & arg)
                }
                handleNest(cur, createInsetMath(im, cur.buffer()));
                im.clear();
-               font_changed = true;
+               include_previous_change = true;
        }
 
        switch(font.fontInfo().size()) {
@@ -675,7 +675,7 @@ void InsetMathNest::handleFont2(Cursor & cur, docstring const & arg)
                break;
        }
        if (!im.empty()) {
-               if (font_changed) {
+               if (include_previous_change) {
                        Cursor oldcur = cur;
                        cur.backwardInset();
                        cur.resetAnchor();
@@ -684,7 +684,7 @@ void InsetMathNest::handleFont2(Cursor & cur, docstring const & arg)
                }
                handleNest(cur, createInsetMath(im, cur.buffer()));
                im.clear();
-               font_changed = true;
+               include_previous_change = true;
        }
 
        InsetMathDecoration const * d = asDecorationInset();
@@ -711,7 +711,7 @@ void InsetMathNest::handleFont2(Cursor & cur, docstring const & arg)
                break;
        }
        if (!im.empty()) {
-               if (font_changed) {
+               if (include_previous_change) {
                        Cursor oldcur = cur;
                        cur.backwardInset();
                        cur.resetAnchor();
@@ -720,7 +720,7 @@ void InsetMathNest::handleFont2(Cursor & cur, docstring const & arg)
                }
                handleNest(cur, createInsetMath(im, cur.buffer()));
                im.clear();
-               font_changed = true;
+               include_previous_change = true;
        }
 
        switch(font.fontInfo().uuline()) {
@@ -735,7 +735,7 @@ void InsetMathNest::handleFont2(Cursor & cur, docstring const & arg)
                break;
        }
        if (!im.empty()) {
-               if (font_changed) {
+               if (include_previous_change) {
                        Cursor oldcur = cur;
                        cur.backwardInset();
                        cur.resetAnchor();
@@ -744,7 +744,7 @@ void InsetMathNest::handleFont2(Cursor & cur, docstring const & arg)
                }
                handleNest(cur, createInsetMath(im, cur.buffer()));
                im.clear();
-               font_changed = true;
+               include_previous_change = true;
        }
 
        switch(font.fontInfo().uwave()) {
@@ -759,7 +759,7 @@ void InsetMathNest::handleFont2(Cursor & cur, docstring const & arg)
                break;
        }
        if (!im.empty()) {
-               if (font_changed) {
+               if (include_previous_change) {
                        Cursor oldcur = cur;
                        cur.backwardInset();
                        cur.resetAnchor();
@@ -768,7 +768,7 @@ void InsetMathNest::handleFont2(Cursor & cur, docstring const & arg)
                }
                handleNest(cur, createInsetMath(im, cur.buffer()));
                im.clear();
-               font_changed = true;
+               include_previous_change = true;
        }
 
        // FIXME: support other font changes here as well?
index da801122cfd9257aa49d77df1689e2769e389dae..75a3f32bc2534cf480b55c68e8fe1c1cd48edf2b 100644 (file)
@@ -84,7 +84,7 @@ void InsetMathTextsize::write(TeXMathStream & os) const
 
 void InsetMathTextsize::normalize(NormalStream & os) const
 {
-       os << "[font " << key_->name << ' ' << cell(0) << ']';
+       os << "[size " << key_->name << ' ' << cell(0) << ']';
 }