From 3237950216b592e7423f1b353a9b247c88e277b7 Mon Sep 17 00:00:00 2001 From: ator-dev Date: Fri, 26 Nov 2021 08:28:58 +0000 Subject: Make delete_lines work correctly regardless of the selection --- editor/code_editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index bfcd2dd4ca..1f01e9d4cf 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -1314,10 +1314,10 @@ void CodeTextEditor::delete_lines() { int count = Math::abs(to_line - from_line) + 1; text_editor->set_caret_line(from_line, false); + text_editor->deselect(); for (int i = 0; i < count; i++) { _delete_line(from_line); } - text_editor->deselect(); } else { _delete_line(text_editor->get_caret_line()); } -- cgit v1.2.3