summaryrefslogtreecommitdiff
path: root/LibGUI/GTextEditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'LibGUI/GTextEditor.cpp')
-rw-r--r--LibGUI/GTextEditor.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/LibGUI/GTextEditor.cpp b/LibGUI/GTextEditor.cpp
index 2af1593994..0b11e1ded0 100644
--- a/LibGUI/GTextEditor.cpp
+++ b/LibGUI/GTextEditor.cpp
@@ -315,6 +315,9 @@ void GTextEditor::toggle_selection_if_needed_for_event(const GKeyEvent& event)
void GTextEditor::keydown_event(GKeyEvent& event)
{
+ if (is_single_line() && event.key() == KeyCode::Key_Tab)
+ return GWidget::keydown_event(event);
+
if (event.key() == KeyCode::Key_Escape) {
if (on_escape_pressed)
on_escape_pressed();
@@ -505,8 +508,6 @@ void GTextEditor::keydown_event(GKeyEvent& event)
if (!is_readonly() && !event.ctrl() && !event.alt() && !event.text().is_empty())
insert_at_cursor_or_replace_selection(event.text());
-
- return GWidget::keydown_event(event);
}
void GTextEditor::delete_current_line()