diff options
-rw-r--r-- | scene/gui/text_edit.cpp | 2 | ||||
-rw-r--r-- | tools/editor/editor_node.cpp | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index c9dd2dacf9..f5e1c82300 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -44,7 +44,7 @@ static bool _is_text_char(CharType c) { static bool _is_symbol(CharType c) { - return c!='_' && ((c>='!' && c<='/') || (c>=':' && c<='@') || (c>='[' && c<='`') || (c>='{' && c<='~') || c=='\t'); + return c!='_' && ((c>='!' && c<='/') || (c>=':' && c<='@') || (c>='[' && c<='`') || (c>='{' && c<='~') || c=='\t' || c==' '); } static bool _is_char(CharType c) { diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 02b0e9447a..6d033a5c25 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -2076,8 +2076,12 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { Node *scene = editor_data.get_edited_scene_root(); if (scene && scene->get_filename()!="") { - //_save_scene(scene->get_filename()); - _save_scene_with_preview(scene->get_filename()); + // save in background if in the script editor + if (_get_current_main_editor() == EDITOR_SCRIPT) { + _save_scene(scene->get_filename()); + } else { + _save_scene_with_preview(scene->get_filename()); + } return; }; // fallthrough to save_as |