From: Julian Smart Date: Thu, 23 Sep 2010 16:24:04 +0000 (+0000) Subject: Fix bug finding line after line break X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d13a8e05c2b46be1d7470478b9dcf5a21ea3d6a1 Fix bug finding line after line break git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65595 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index 0a46f82d00..1b3ff5896f 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -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