Fix bug finding line after line break

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65595 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2010-09-23 16:24:04 +00:00
parent c27615f55c
commit d13a8e05c2

View File

@@ -1387,7 +1387,7 @@ long wxRichTextParagraphLayoutBox::GetVisibleLineNumber(long pos, bool caretPosi
wxRichTextLine* line = node2->GetData();
wxRichTextRange lineRange = line->GetAbsoluteRange();
if (lineRange.Contains(pos))
if (lineRange.Contains(pos) || pos == lineRange.GetStart())
{
// If the caret is displayed at the end of the previous wrapped line,
// we want to return the line it's _displayed_ at (not the actual line