Skip to content

Commit

Permalink
Merge pull request #36621 from WizardOhio24/fix-wrong-selection-on-li…
Browse files Browse the repository at this point in the history
…ne-clone-down

Fix wrong selection on cloning a line down in the editor
  • Loading branch information
akien-mga authored Mar 1, 2020
2 parents 0e25f54 + 28f7432 commit 55396d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion editor/code_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1257,7 +1257,7 @@ void CodeTextEditor::clone_lines_down() {
text_editor->cursor_set_line(cursor_new_line);
text_editor->cursor_set_column(cursor_new_column);
if (selection_active) {
text_editor->select(to_line, to_column, 2 * to_line - from_line, 2 * to_column - from_column);
text_editor->select(to_line, to_column, 2 * to_line - from_line, to_line == from_line ? 2 * to_column - from_column : to_column);
}

text_editor->end_complex_operation();
Expand Down

0 comments on commit 55396d6

Please sign in to comment.