Browse Source

Forcibly end current TextEdit action on undo redo

Paulb23 3 years ago
parent
commit
76005e5ff7
1 changed files with 6 additions and 0 deletions
  1. 6 0
      scene/gui/text_edit.cpp

+ 6 - 0
scene/gui/text_edit.cpp

@@ -3810,6 +3810,9 @@ void TextEdit::undo() {
 		return;
 		return;
 	}
 	}
 
 
+	if (in_action) {
+		pending_action_end = true;
+	}
 	_push_current_op();
 	_push_current_op();
 
 
 	if (undo_stack_pos == nullptr) {
 	if (undo_stack_pos == nullptr) {
@@ -3871,6 +3874,9 @@ void TextEdit::redo() {
 		return;
 		return;
 	}
 	}
 
 
+	if (in_action) {
+		pending_action_end = true;
+	}
 	_push_current_op();
 	_push_current_op();
 
 
 	if (undo_stack_pos == nullptr) {
 	if (undo_stack_pos == nullptr) {