Skip to content

Commit

Permalink
Merge pull request #28281 from zqyoung1/fix-selection-undo
Browse files Browse the repository at this point in the history
Fix selection undo
  • Loading branch information
akien-mga authored Apr 29, 2019
2 parents 17ad16e + 516b80c commit 6822ee3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scene/gui/text_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6822ee3

Please sign in to comment.