Skip to content

Commit

Permalink
Merge pull request #60231 from timothyqiu/undo-autocomplete
Browse files Browse the repository at this point in the history
[3.x] Fix undo history for function name autocompletion
  • Loading branch information
akien-mga committed Apr 14, 2022
2 parents e1eb3c2 + 19a0145 commit 79bcfb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scene/gui/text_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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--;
}
Expand Down

0 comments on commit 79bcfb8

Please sign in to comment.