summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/animation/animation_player.cpp3
-rw-r--r--scene/gui/text_edit.cpp37
2 files changed, 19 insertions, 21 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index 25f49a8a8b..cecdd2bc40 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -1299,6 +1299,9 @@ void AnimationPlayer::_bind_methods() {
ObjectTypeDB::bind_method(_MD("get_animation:Animation","name"),&AnimationPlayer::get_animation);
ObjectTypeDB::bind_method(_MD("get_animation_list"),&AnimationPlayer::_get_animation_list);
+ ObjectTypeDB::bind_method(_MD("animation_set_next", "anim_from", "anim_to"), &AnimationPlayer::animation_set_next);
+ ObjectTypeDB::bind_method(_MD("animation_get_next", "anim_from"), &AnimationPlayer::animation_get_next);
+
ObjectTypeDB::bind_method(_MD("set_blend_time","anim_from","anim_to","sec"),&AnimationPlayer::set_blend_time);
ObjectTypeDB::bind_method(_MD("get_blend_time","anim_from","anim_to"),&AnimationPlayer::get_blend_time);
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 05f7725a92..bf8aff0f44 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -1659,35 +1659,27 @@ void TextEdit::_input_event(const InputEvent& p_input_event) {
if (k.unicode>32) {
- if (cursor.column<text[cursor.line].length() && text[cursor.line][cursor.column]==k.unicode) {
- //same char, move ahead
- cursor_set_column(cursor.column+1);
-
+ const CharType chr[2] = {(CharType)k.unicode, 0};
+ if(auto_brace_completion_enabled && _is_pair_symbol(chr[0])) {
+ _consume_pair_symbol(chr[0]);
} else {
- //different char, go back
- const CharType chr[2] = {(CharType)k.unicode, 0};
- if(auto_brace_completion_enabled && _is_pair_symbol(chr[0])) {
- _consume_pair_symbol(chr[0]);
- } else {
- // remove the old character if in insert mode
- if (insert_mode) {
- begin_complex_operation();
+ // remove the old character if in insert mode
+ if (insert_mode) {
+ begin_complex_operation();
- // make sure we don't try and remove empty space
- if (cursor.column < get_line(cursor.line).length()) {
- _remove_text(cursor.line, cursor.column, cursor.line, cursor.column + 1);
- }
+ // make sure we don't try and remove empty space
+ if (cursor.column < get_line(cursor.line).length()) {
+ _remove_text(cursor.line, cursor.column, cursor.line, cursor.column + 1);
}
+ }
- _insert_text_at_cursor(chr);
+ _insert_text_at_cursor(chr);
- if (insert_mode) {
- end_complex_operation();
- }
+ if (insert_mode) {
+ end_complex_operation();
}
}
-
_update_completion_candidates();
accept_event();
@@ -3911,6 +3903,9 @@ void TextEdit::_update_completion_candidates() {
}
}
+ if (l[cursor.column - 1] == '(' && !pre_keyword && !completion_strings[0].begins_with("\"")) {
+ cancel = true;
+ }
update();