소스 검색

Merge pull request #22992 from Paulb23/delete_line_off_by_one

Fixed delete line being off by one, issue 22819
Rémi Verschelde 7 년 전
부모
커밋
40ddab512f
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      editor/code_editor.cpp

+ 2 - 0
editor/code_editor.cpp

@@ -1039,6 +1039,8 @@ void CodeTextEditor::delete_lines() {
 		int to_line = text_editor->get_selection_to_line();
 		int from_line = text_editor->get_selection_from_line();
 		int count = Math::abs(to_line - from_line) + 1;
+
+		text_editor->cursor_set_line(to_line, false);
 		while (count) {
 			text_editor->set_line(text_editor->cursor_get_line(), "");
 			text_editor->backspace_at_cursor();