]> git.lyx.org Git - lyx.git/commitdiff
Attempt on #6655.
authorPavel Sanda <sanda@lyx.org>
Fri, 16 Apr 2010 18:52:40 +0000 (18:52 +0000)
committerPavel Sanda <sanda@lyx.org>
Fri, 16 Apr 2010 18:52:40 +0000 (18:52 +0000)
getRowFromIdPos returns row shifted by 1 (we count internally from 0).

The function still doesn't work properly looking at the
the comments of the original writer (last *nonempty* row),
but its hopefully better now.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34172 a592a061-630c-0410-9148-cb99ea01b6c8

src/TexRow.cpp

index f019c25ea31769fba74b26be224014485f430724..a18d84f5438925847e1a65129d5f14f7236aeb97 100644 (file)
@@ -84,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;
 }