Merge pull request #28281 from zqyoung1/fix-selection-undo

Fix selection undo
This commit is contained in:
Rémi Verschelde 2019-04-29 17:25:14 +02:00 committed by GitHub
commit 6822ee37dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5415,6 +5415,9 @@ void TextEdit::undo() {
TextOperation op = undo_stack_pos->get();
_do_text_op(op, true);
if (op.from_line != op.to_line || op.to_column != op.from_column + 1)
select(op.from_line, op.from_column, op.to_line, op.to_column);
current_op.version = op.prev_version;
if (undo_stack_pos->get().chain_backward) {
while (true) {