TextDocumentLayout: Fixed finding paragraph by line index.

This commit is contained in:
Stephan Aßmus 2014-01-22 22:34:33 +01:00
parent b5951f2063
commit 8346431fdd

View File

@ -358,7 +358,7 @@ TextDocumentLayout::_ParagraphLayoutIndexForLineIndex(int32& lineIndex)
const ParagraphLayoutInfo& info = fParagraphLayouts.ItemAtFast(i);
int32 lineCount = info.layout->CountLines();
if (lineIndex > lineCount) {
if (lineIndex >= lineCount) {
lineIndex -= lineCount;
continue;
}