aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/plugins/script_editor_plugin.h
diff options
context:
space:
mode:
authorPaulb232016-04-23 19:21:34 +0100
committerPaulb232016-04-23 19:21:34 +0100
commitf3e6569e00b6fcebe5f932d91cf0df24411ce062 (patch)
tree89ef5b058194a2c7d1ca413d9aa690197bae2181 /tools/editor/plugins/script_editor_plugin.h
parent7d89a8b7481c1e172958010366b3735b6d000591 (diff)
downloadgodot-f3e6569e00b6fcebe5f932d91cf0df24411ce062.tar.gz
godot-f3e6569e00b6fcebe5f932d91cf0df24411ce062.tar.zst
godot-f3e6569e00b6fcebe5f932d91cf0df24411ce062.zip
Trim trailing white space on save, issue 4383
Diffstat (limited to 'tools/editor/plugins/script_editor_plugin.h')
-rw-r--r--tools/editor/plugins/script_editor_plugin.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/editor/plugins/script_editor_plugin.h b/tools/editor/plugins/script_editor_plugin.h
index 5664b2658..68aef4d39 100644
--- a/tools/editor/plugins/script_editor_plugin.h
+++ b/tools/editor/plugins/script_editor_plugin.h
@@ -131,6 +131,7 @@ class ScriptEditor : public VBoxContainer {
EDIT_SELECT_ALL,
EDIT_COMPLETE,
EDIT_AUTO_INDENT,
+ EDIT_TRIM_TRAILING_WHITESAPCE,
EDIT_TOGGLE_COMMENT,
EDIT_MOVE_LINE_UP,
EDIT_MOVE_LINE_DOWN,
@@ -238,6 +239,10 @@ class ScriptEditor : public VBoxContainer {
void _add_callback(Object *p_obj, const String& p_function, const StringArray& p_args);
void _res_saved_callback(const Ref<Resource>& p_res);
+ bool trim_trailing_whitespace_on_save;
+
+ void _trim_trailing_whitespace(TextEdit *tx);
+
void _goto_script_line2(int p_line);
void _goto_script_line(REF p_script,int p_line);
void _breaked(bool p_breaked,bool p_can_debug);