]> git.lyx.org Git - lyx.git/blobdiff - src/text2.C
Fix copy&paste bug
[lyx.git] / src / text2.C
index d1399ebd911c7315863efe61fed764b2c05462c3..cfd6b11b419c3cb407a293f8b8703ae5d8c288a5 100644 (file)
@@ -945,7 +945,7 @@ pit_type LyXText::getPitNearY(BufferView & bv, int y)
                pit = last->first + 1;
                //  and we are not at the last paragraph in the inset.
                if (pit == pars_.size())
-                       return it->first;
+                       return last->first;
                // then this is the paragraph we are looking for.
                // rebreak it and update the CoordCache.
                redoParagraph(bv, pit);