Merge pull request #15657 from paulloz/fix-textedit-undo-redo-selection

TextEdit: Fix selection issue with undo/redo
This commit is contained in:
Rémi Verschelde 2018-01-13 17:05:46 +01:00 committed by GitHub
commit 69452fbc37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -4878,6 +4878,8 @@ void TextEdit::undo() {
else
undo_stack_pos = undo_stack_pos->prev();
deselect();
TextOperation op = undo_stack_pos->get();
_do_text_op(op, true);
current_op.version = op.prev_version;
@ -4912,6 +4914,8 @@ void TextEdit::redo() {
if (undo_stack_pos == NULL)
return; //nothing to do.
deselect();
TextOperation op = undo_stack_pos->get();
_do_text_op(op, false);
current_op.version = op.version;