]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix bug finding line after line break
authorJulian Smart <julian@anthemion.co.uk>
Thu, 23 Sep 2010 16:24:04 +0000 (16:24 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 23 Sep 2010 16:24:04 +0000 (16:24 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65595 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextbuffer.cpp

index 0a46f82d005298256d974c67cbdd2a32a472157e..1b3ff5896fdf4ad487d3b17cc0db894ee659cdcc 100644 (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