Support ctrl-delete for delete word forward.

(On non-Macs, anyway.  Mac doesn't appear to use this
paradigm.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20248

(cherry picked from commit ce5469b95e32d7894a43d4bdd84514dd38ddba4c)
This commit is contained in:
Jeff Young 2025-03-06 23:49:51 +00:00
parent 4df101b94e
commit 25de338bdd

View File

@ -414,7 +414,14 @@ void SCINTILLA_TRICKS::onCharHook( wxKeyEvent& aEvent )
else if( aEvent.GetKeyCode() == WXK_DELETE )
{
if( m_te->GetSelectionEnd() == m_te->GetSelectionStart() )
m_te->CharRightExtend();
{
#ifndef __WXMAC__
if( aEvent.GetModifiers() == wxMOD_CONTROL )
m_te->WordRightExtend();
else
#endif
m_te->CharRightExtend();
}
if( m_te->GetSelectionEnd() > m_te->GetSelectionStart() )
m_te->DeleteBack();