Merge pull request #36621 from WizardOhio24/fix-wrong-selection-on-line-clone-down

Fix wrong selection on cloning a line down in the editor
This commit is contained in:
Rémi Verschelde 2020-03-01 15:53:55 +01:00 committed by GitHub
commit 55396d6e06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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();