mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Fix undo history for function name autocompletion
(cherry picked from commit 19a0145742)
This commit is contained in:
committed by
Rémi Verschelde
parent
5816a26c04
commit
355c73de32
@@ -6597,13 +6597,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--;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user