瀏覽代碼

Forcibly end current TextEdit action on undo redo

Paulb23 3 年之前
父節點
當前提交
76005e5ff7
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      scene/gui/text_edit.cpp

+ 6 - 0
scene/gui/text_edit.cpp

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