diff options
author | Alfred Reinold Baudisch <alfred@alfredbaudisch.com> | 2022-11-05 08:55:01 +0100 |
---|---|---|
committer | Alfred Reinold Baudisch <alfred@alfredbaudisch.com> | 2022-11-05 08:55:18 +0100 |
commit | 7127e57bf8e2281059287e2e8b3c57b84ecfe978 (patch) | |
tree | 8a4a7a6aae5711a536f00b32af52f9eea0ca8b82 | |
parent | ec521a405a89a1b80a9989c09dcc2f2e7763ddcf (diff) |
Pass caret index when deleting selection with backspace
Fixes and closes #67992
-rw-r--r-- | scene/gui/code_edit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp index 5f8f25154c..ea310f5a12 100644 --- a/scene/gui/code_edit.cpp +++ b/scene/gui/code_edit.cpp @@ -694,8 +694,8 @@ void CodeEdit::_backspace_internal(int p_caret) { return; } - if (has_selection()) { - delete_selection(); + if (has_selection(p_caret)) { + delete_selection(p_caret); return; } |