X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftext2.C;h=cfd6b11b419c3cb407a293f8b8703ae5d8c288a5;hb=1116115055ae80319e7f6b7b811019dbba35645d;hp=d1399ebd911c7315863efe61fed764b2c05462c3;hpb=1000b8d218e521df4cebade8aa549e374118203f;p=lyx.git diff --git a/src/text2.C b/src/text2.C index d1399ebd91..cfd6b11b41 100644 --- a/src/text2.C +++ b/src/text2.C @@ -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);