git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53246
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
int key = event.GetKeyCode() ;
bool eat_key = false ;
{
int key = event.GetKeyCode() ;
bool eat_key = false ;
if ( key == 'a' && event.MetaDown() )
{
if ( key == 'a' && event.MetaDown() )
{
// Check if we have reached the max # of chars (if it is set), but still
// allow navigation and deletion
// Check if we have reached the max # of chars (if it is set), but still
// allow navigation and deletion
+ GetSelection( &from, &to );
if ( !IsMultiLine() && m_maxLength && GetValue().length() >= m_maxLength &&
key != WXK_LEFT && key != WXK_RIGHT && key != WXK_TAB &&
if ( !IsMultiLine() && m_maxLength && GetValue().length() >= m_maxLength &&
key != WXK_LEFT && key != WXK_RIGHT && key != WXK_TAB &&
- key != WXK_BACK && !( key == WXK_RETURN && (m_windowStyle & wxTE_PROCESS_ENTER) )
- )
+ key != WXK_BACK && key != WXK_DELETE && !( key == WXK_RETURN && (m_windowStyle & wxTE_PROCESS_ENTER) ) &&
+ from == to )
{
// eat it, we don't want to add more than allowed # of characters
{
// eat it, we don't want to add more than allowed # of characters