1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00

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

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);