mirror of
https://github.com/godotengine/godot.git
synced 2024-11-23 12:43:43 +00:00
Script Editor: Use first non-whitespace comment delimiter.
As suggested by @neikeq in https://github.com/godotengine/godot/pull/13489#issuecomment-348690816
This commit is contained in:
parent
1a317a39ed
commit
faaa012b84
@ -1042,8 +1042,13 @@ void ScriptTextEditor::_edit_option(int p_op) {
|
||||
String delimiter = "#";
|
||||
List<String> comment_delimiters;
|
||||
scr->get_language()->get_comment_delimiters(&comment_delimiters);
|
||||
if (!comment_delimiters.empty()) {
|
||||
delimiter = comment_delimiters.front()->get();
|
||||
|
||||
for (List<String>::Element *E = comment_delimiters.front(); E; E = E->next()) {
|
||||
String script_delimiter = E->get();
|
||||
if (script_delimiter.find(" ") == -1) {
|
||||
delimiter = script_delimiter;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
tx->begin_complex_operation();
|
||||
|
Loading…
Reference in New Issue
Block a user