diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index 185b136cdc..09d5c1b3d9 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -964,6 +964,9 @@ void wxRichTextCtrl::OnMoveMouse(wxMouseEvent& event) && !m_preDrag && (distance > 4) #endif + // Don't select to the end of the container when going outside the window + // For analysis, see http://trac.wxwidgets.org/ticket/15714 + && (! (hitObj == (& m_buffer) && ((hit & wxRICHTEXT_HITTEST_OUTSIDE) != 0))) ) { SetCaretPositionAfterClick(container, position, hit, true /* extend selection */);