Don't process SCINTILLA_TRICKS onCharHook when autocomplete is active.
(ESC being the exception that proves the rule.) Fixes https://gitlab.com/kicad/code/kicad/-/issues/15001
This commit is contained in:
+15
-12
@@ -173,6 +173,21 @@ void SCINTILLA_TRICKS::onCharHook( wxKeyEvent& aEvent )
|
||||
{
|
||||
wxString c = aEvent.GetUnicodeKey();
|
||||
|
||||
if( m_te->AutoCompActive() )
|
||||
{
|
||||
if( aEvent.GetKeyCode() == WXK_ESCAPE )
|
||||
{
|
||||
m_te->AutoCompCancel();
|
||||
m_suppressAutocomplete = true; // Don't run autocomplete again on the next char...
|
||||
}
|
||||
else
|
||||
{
|
||||
aEvent.Skip();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if( !isalpha( aEvent.GetKeyCode() ) )
|
||||
m_suppressAutocomplete = false;
|
||||
|
||||
@@ -274,18 +289,6 @@ void SCINTILLA_TRICKS::onCharHook( wxKeyEvent& aEvent )
|
||||
if( m_te->GetSelectionEnd() > m_te->GetSelectionStart() )
|
||||
m_te->DeleteBack();
|
||||
}
|
||||
else if( aEvent.GetKeyCode() == WXK_ESCAPE )
|
||||
{
|
||||
if( m_te->AutoCompActive() )
|
||||
{
|
||||
m_te->AutoCompCancel();
|
||||
m_suppressAutocomplete = true; // Don't run autocomplete again on the next char...
|
||||
}
|
||||
else
|
||||
{
|
||||
aEvent.Skip();
|
||||
}
|
||||
}
|
||||
else if( isCtrlSlash( aEvent ) )
|
||||
{
|
||||
int startLine = m_te->LineFromPosition( m_te->GetSelectionStart() );
|
||||
|
||||
Reference in New Issue
Block a user