浏览代码

Merge pull request #29838 from KoBeWi/4real

Fix selection undo... for real
Rémi Verschelde 6 年之前
父节点
当前提交
2935caa13f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scene/gui/text_edit.cpp

+ 1 - 1
scene/gui/text_edit.cpp

@@ -5613,7 +5613,7 @@ 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)
+	if (op.type != TextOperation::TYPE_INSERT && (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;