summaryrefslogtreecommitdiff
path: root/tools/editor/plugins/script_editor_plugin.h
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2016-04-24 14:33:04 +0200
committerRémi Verschelde <remi@verschelde.fr>2016-04-24 14:33:04 +0200
commit82a725a3fd8033c87c2e15232bab6dd01e877710 (patch)
treec13112ebef45a6d8d0b2bfb5b69935c8cc316b16 /tools/editor/plugins/script_editor_plugin.h
parenta1ebf555b757f493b69c37f2baf498dd472ed396 (diff)
parentf3e6569e00b6fcebe5f932d91cf0df24411ce062 (diff)
Merge pull request #4414 from Paulb23/trim_whitespace
Trim trailing whitespace on save
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 5664b26580..68aef4d39c 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);