mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Move auto brace completion to CodeEdit
This commit is contained in:
parent
80143c9701
commit
12f0053555
10 changed files with 372 additions and 279 deletions
|
@ -205,6 +205,10 @@ void ScriptTextEditor::_set_theme_for_script() {
|
|||
String beg = string.get_slice(" ", 0);
|
||||
String end = string.get_slice_count(" ") > 1 ? string.get_slice(" ", 1) : String();
|
||||
text_edit->add_string_delimiter(beg, end, end == "");
|
||||
|
||||
if (!end.is_empty() && !text_edit->has_auto_brace_completion_open_key(beg)) {
|
||||
text_edit->add_auto_brace_completion_pair(beg, end);
|
||||
}
|
||||
}
|
||||
|
||||
List<String> comments;
|
||||
|
@ -214,6 +218,10 @@ void ScriptTextEditor::_set_theme_for_script() {
|
|||
String beg = comment.get_slice(" ", 0);
|
||||
String end = comment.get_slice_count(" ") > 1 ? comment.get_slice(" ", 1) : String();
|
||||
text_edit->add_comment_delimiter(beg, end, end == "");
|
||||
|
||||
if (!end.is_empty() && !text_edit->has_auto_brace_completion_open_key(beg)) {
|
||||
text_edit->add_auto_brace_completion_pair(beg, end);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue