Add editor settings for autocompletion with NodePath and StringName
This commit is contained in:
parent
fe01776f05
commit
de8b6f7a3c
7 changed files with 38 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue