From b88be25214bed4a2faf7af0f781d5ff3e8175d16 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 23 Jan 2020 21:07:37 +0100 Subject: [PATCH] GTextEditor: Disable auto-indentation while pasting Fixes #1121. --- Libraries/LibGUI/GTextEditor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Libraries/LibGUI/GTextEditor.cpp b/Libraries/LibGUI/GTextEditor.cpp index a992a9fb1e..3a805bc419 100644 --- a/Libraries/LibGUI/GTextEditor.cpp +++ b/Libraries/LibGUI/GTextEditor.cpp @@ -1152,6 +1152,8 @@ void GTextEditor::paste() return; auto paste_text = GClipboard::the().data(); printf("Paste: \"%s\"\n", paste_text.characters()); + + TemporaryChange change(m_automatic_indentation_enabled, false); insert_at_cursor_or_replace_selection(paste_text); }