You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Add editor settings for autocompletion with NodePath and StringName
This commit is contained in:
@@ -1946,9 +1946,12 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
|
||||
|
||||
if (d.has("type") && String(d["type"]) == "obj_property") {
|
||||
te->remove_secondary_carets();
|
||||
|
||||
bool add_literal = EDITOR_GET("text_editor/completion/add_node_path_literals");
|
||||
String text_to_drop = add_literal ? "^" : "";
|
||||
// It is unclear whether properties may contain single or double quotes.
|
||||
// Assume here that double-quotes may not exist. We are escaping single-quotes if necessary.
|
||||
const String text_to_drop = _quote_drop_data(String(d["property"]));
|
||||
text_to_drop += _quote_drop_data(String(d["property"]));
|
||||
|
||||
te->set_caret_line(row);
|
||||
te->set_caret_column(col);
|
||||
|
||||
Reference in New Issue
Block a user