From 504e0656bb7d530204ce7deb20075b6569846d50 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Tue, 16 Apr 2024 17:34:01 +0800 Subject: Add TextEdit option to prevent copying without a selection --- scene/gui/code_edit.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scene/gui/code_edit.cpp') diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp index c3287035ff..635228670d 100644 --- a/scene/gui/code_edit.cpp +++ b/scene/gui/code_edit.cpp @@ -831,6 +831,9 @@ void CodeEdit::_cut_internal(int p_caret) { delete_selection(p_caret); return; } + if (!is_empty_selection_clipboard_enabled()) { + return; + } if (p_caret == -1) { delete_lines(); } else { -- cgit v1.2.3