Browse Source

Pass caret index when deleting selection with backspace

Fixes and closes #67992
Alfred Reinold Baudisch 2 năm trước cách đây
mục cha
commit
7127e57bf8
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      scene/gui/code_edit.cpp

+ 2 - 2
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;
 	}