diff --git a/vstgui/lib/ctexteditor.cpp b/vstgui/lib/ctexteditor.cpp index 68c481acd..29f60abea 100644 --- a/vstgui/lib/ctexteditor.cpp +++ b/vstgui/lib/ctexteditor.cpp @@ -1244,11 +1244,9 @@ void TextEditorView::onKeyboardEvent (KeyboardEvent& event) const auto& cmd = md.commandKeys[index]; if (cmd == event) { - if (handleCommand (static_cast<Command> (index))) - { - event.consumed = true; - return; - } + handleCommand (static_cast<Command> (index)); + event.consumed = true; + return; } }