diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-04-29 17:25:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-29 17:25:14 +0200 |
commit | 6822ee37ddc81866236bada00fae9bf802451165 (patch) | |
tree | 3d9365b66c3391358b3dfea7b9955abe75954c1f /scene | |
parent | 17ad16e3965d861b9e6fe98aca6c7031d5841709 (diff) | |
parent | 516b80cd6549a8fcaa06b1bf1591b9b78508c8bc (diff) |
Merge pull request #28281 from zqyoung1/fix-selection-undo
Fix selection undo
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/text_edit.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 3389e34f07..9c6fa703fa 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -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) { |