Attempt to handle deleting double-byte chars in Scintilla.

This commit is contained in:
Jeff Young 2021-07-08 20:44:04 +01:00
parent 46701c1195
commit 9975b8fb10
1 changed files with 3 additions and 2 deletions

View File

@ -208,10 +208,11 @@ void SCINTILLA_TRICKS::onCharHook( wxKeyEvent& aEvent )
} }
else if( aEvent.GetKeyCode() == WXK_DELETE ) else if( aEvent.GetKeyCode() == WXK_DELETE )
{ {
if( m_te->GetSelectionEnd() == m_te->GetSelectionStart() )
m_te->CharRightExtend();
if( m_te->GetSelectionEnd() > m_te->GetSelectionStart() ) if( m_te->GetSelectionEnd() > m_te->GetSelectionStart() )
m_te->DeleteBack(); m_te->DeleteBack();
else
m_te->DeleteRange( m_te->GetSelectionStart(), 1 );
} }
else if( aEvent.GetKeyCode() == WXK_ESCAPE ) else if( aEvent.GetKeyCode() == WXK_ESCAPE )
{ {