From 6697ab33dccac5aa67f748e77b0ee667e8cfe3d8 Mon Sep 17 00:00:00 2001 From: networkException Date: Sun, 10 Jul 2022 13:36:29 +0200 Subject: [PATCH] LibGUI: Disallow selection identation in readonly text editors --- Userland/Libraries/LibGUI/TextEditor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Libraries/LibGUI/TextEditor.cpp b/Userland/Libraries/LibGUI/TextEditor.cpp index f678ae95ee..0bc89b95c7 100644 --- a/Userland/Libraries/LibGUI/TextEditor.cpp +++ b/Userland/Libraries/LibGUI/TextEditor.cpp @@ -868,6 +868,8 @@ void TextEditor::keydown_event(KeyEvent& event) } if (event.key() == KeyCode::Key_Tab) { + if (!is_editable()) + return; if (has_selection()) { if (event.modifiers() == Mod_Shift) { unindent_selection();