]> git.lyx.org Git - lyx.git/blobdiff - src/TexRow.cpp
(finishing patch -- question was restored, but there were still problems)
[lyx.git] / src / TexRow.cpp
index f95602ec3a5e27d7a8ca729cf2fef0e88bd79d3c..a18d84f5438925847e1a65129d5f14f7236aeb97 100644 (file)
@@ -44,6 +44,12 @@ void TexRow::newline()
        rowlist.push_back(tmp);
 }
 
+void TexRow::newlines(int num_lines)
+{
+       for (int i = 0; i < num_lines; ++i) {
+               newline();
+       }
+}
 
 bool TexRow::getIdFromRow(int row, int & id, int & pos) const
 {
@@ -78,7 +84,7 @@ int TexRow::getRowFromIdPos(int id, int pos) const
        }
        if (!foundid)
                return rowlist.size();
-       return distance(rowlist.begin(), bestrow);
+       return distance(rowlist.begin(), bestrow) + 1;
 }