summaryrefslogtreecommitdiff
path: root/core/input
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2021-08-13 21:24:02 +0200
committerRémi Verschelde <rverschelde@gmail.com>2021-08-13 21:27:57 +0200
commit81512a3732dd2cad3989fa94c0ec9261c6930030 (patch)
tree6929ef6556b209b55eba363b069fb07b9cbd47da /core/input
parent4c3ece8c4bdb6d4927e69dce1c9b716ebc93d4ee (diff)
Style: Cleanup code using `text_editor/completion/use_single_quotes`
Diffstat (limited to 'core/input')
-rw-r--r--core/input/input.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/input/input.cpp b/core/input/input.cpp
index 8ba8b892ac..72563cc40a 100644
--- a/core/input/input.cpp
+++ b/core/input/input.cpp
@@ -163,8 +163,7 @@ void Input::_bind_methods() {
void Input::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
#ifdef TOOLS_ENABLED
-
- const String quote_style = EDITOR_DEF("text_editor/completion/use_single_quotes", 0) ? "'" : "\"";
+ const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\"";
String pf = p_function;
if (p_idx == 0 && (pf == "is_action_pressed" || pf == "action_press" || pf == "action_release" ||
@@ -180,7 +179,7 @@ void Input::get_argument_options(const StringName &p_function, int p_idx, List<S
}
String name = pi.name.substr(pi.name.find("/") + 1, pi.name.length());
- r_options->push_back(quote_style + name + quote_style);
+ r_options->push_back(name.quote(quote_style));
}
}
#endif