]> git.lyx.org Git - features.git/blobdiff - src/Text.cpp
Fix bug #11102.
[features.git] / src / Text.cpp
index 001aca5ded7a8843e99cea04b0c7a5855d9605e9..3de796442c285b89255a3428809b0ed0972c7e78 100644 (file)
@@ -984,8 +984,8 @@ void Text::insertChar(Cursor & cur, char_type c)
                        number(cur); // Set current_font.number to ON
 
                        if (cur.pos() != 0) {
-                               char_type const c = par.getChar(cur.pos() - 1);
-                               if (contains(number_unary_operators, c) &&
+                               char_type const ch = par.getChar(cur.pos() - 1);
+                               if (contains(number_unary_operators, ch) &&
                                    (cur.pos() == 1
                                     || par.isSeparator(cur.pos() - 2)
                                     || par.isEnvSeparator(cur.pos() - 2)
@@ -993,7 +993,7 @@ void Text::insertChar(Cursor & cur, char_type c)
                                  ) {
                                        setCharFont(pit, cur.pos() - 1, cur.current_font,
                                                tm.font_);
-                               } else if (contains(number_separators, c)
+                               } else if (contains(number_separators, ch)
                                     && cur.pos() >= 2
                                     && tm.displayFont(pit, cur.pos() - 2).fontInfo().number() == FONT_ON) {
                                        setCharFont(pit, cur.pos() - 1, cur.current_font,
@@ -1952,6 +1952,8 @@ docstring Text::currentState(CursorData const & cur, bool devel_mode) const
 
        if (devel_mode) {
                os << _(", Inset: ") << &cur.inset();
+               if (cur.lastidx() > 0)
+                       os << _(", Cell: ") << cur.idx();
                os << _(", Paragraph: ") << cur.pit();
                os << _(", Id: ") << par.id();
                os << _(", Position: ") << cur.pos();
@@ -1977,7 +1979,7 @@ docstring Text::getPossibleLabel(DocIterator const & cur) const
        Layout const * layout = &(pars_[pit].layout());
 
        docstring text;
-       docstring par_text = pars_[pit].asString();
+       docstring par_text = pars_[pit].asString(AS_STR_SKIPDELETE);
 
        // The return string of math matrices might contain linebreaks
        par_text = subst(par_text, '\n', '-');