]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_cursor.C
updates to latexfeatures stuff; allow empty \document_path
[lyx.git] / src / mathed / math_cursor.C
index 34ecf9af922d240337db9299982856d00fc2d14e..e54922cae0898837ea7d06d86854bba7785278ca 100644 (file)
@@ -617,9 +617,9 @@ void MathCursor::macroModeClose()
 }
 
 
-int MathCursor::macroNamePos() const
+MathInset::difference_type MathCursor::macroNamePos() const
 {
-       for (int i = pos() - 1; i >= 0; --i) { 
+       for (MathInset::difference_type i = pos() - 1; i >= 0; --i) { 
                MathAtom & p = array().at(i);
                if (p->code() == LM_TC_TEX && p->getChar() == '\\')
                        return i;
@@ -631,7 +631,8 @@ int MathCursor::macroNamePos() const
 string MathCursor::macroName() const
 {
        string s;
-       for (int i = macroNamePos(); i >= 0 && i < int(pos()); ++i) 
+       MathInset::difference_type i = macroNamePos(); 
+       for ( ; i >= 0 && i < int(pos()); ++i) 
                s += array().at(i)->getChar();
        return s;
 }
@@ -858,7 +859,7 @@ bool MathCursor::selection() const
 
 MathGridInset * MathCursor::enclosingGrid(MathCursor::idx_type & idx) const
 {
-       for (int i = Cursor_.size() - 1; i >= 0; --i) {
+       for (MathInset::difference_type i = Cursor_.size() - 1; i >= 0; --i) {
                MathGridInset * p = Cursor_[i].par_->asGridInset();
                if (p) {
                        idx = Cursor_[i].idx_;