TextEditor: Prevent pasting with empty clipboard

Prevent erasing selected text when pasting with empty clipboard
This commit is contained in:
Carlos César Neves Enumo 2021-05-22 17:29:32 -03:00 committed by Andreas Kling
parent 282d0ebbec
commit 76a07b31e4
Notes: sideshowbarker 2024-07-18 17:31:36 +09:00

View File

@ -1286,6 +1286,10 @@ void TextEditor::paste()
return;
auto paste_text = Clipboard::the().data();
if (paste_text.is_empty())
return;
printf("Paste: \"%s\"\n", String::copy(paste_text).characters());
TemporaryChange change(m_automatic_indentation_enabled, false);