From 9596db7c4ba1a80ed7614455fb7cf18b1cbdd75c Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 28 Nov 2013 16:50:49 +0000 Subject: [PATCH] Partial fix for #15714: Caret jumping problem in wxRichTextCtrl text selection git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/richtext/richtextctrl.cpp | 3 +++ 1 file changed, 3 insertions(+) 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 */);