Merge pull request #46572 from jmb462/fix-selection-error-after-commenting-or-indenting

Fix selection error after commenting or indenting text (Fix #46477 issue)
This commit is contained in:
Rémi Verschelde 2021-03-07 17:03:54 +01:00 committed by GitHub
commit 9b853d7a7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2989,8 +2989,6 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
} else {
if (cursor.line < selection.selecting_line || (cursor.line == selection.selecting_line && cursor.column < selection.selecting_column)) {
if (selection.shiftclick_left) {
SWAP(selection.from_column, selection.to_column);
SWAP(selection.from_line, selection.to_line);
selection.shiftclick_left = !selection.shiftclick_left;
}
selection.from_column = cursor.column;