From 19a014574297cd0f05edc82f0321c8cf8cf7a75f Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Thu, 14 Apr 2022 14:37:31 +0800 Subject: [PATCH] Fix undo history for function name autocompletion --- scene/gui/text_edit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 8d790e070cb..c8ce232f287 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -6793,13 +6793,13 @@ void TextEdit::_confirm_completion() { if (last_completion_char == '(') { if (next_char == last_completion_char) { - _base_remove_text(cursor.line, cursor.column - 1, cursor.line, cursor.column); + _remove_text(cursor.line, cursor.column - 1, cursor.line, cursor.column); } else if (auto_brace_completion_enabled) { insert_text_at_cursor(")"); cursor.column--; } } else if (last_completion_char == ')' && next_char == '(') { - _base_remove_text(cursor.line, cursor.column - 2, cursor.line, cursor.column); + _remove_text(cursor.line, cursor.column - 2, cursor.line, cursor.column); if (line[cursor.column + 1] != ')') { cursor.column--; }