summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-09-18 08:58:18 +0200
committerGitHub <noreply@github.com>2017-09-18 08:58:18 +0200
commitcc161dcd6f08277a7e88b527172a8968b56c4fa4 (patch)
tree5d8cb5790e20b7c2fa54f0f201120a7fd8b2b656 /scene
parentaa4694b7b4717d7b43e0fb9a037d07cd20ad14cd (diff)
parent9b72f0804268b99b341c0c700cdac5617162216d (diff)
Merge pull request #11021 from tuga3d/autocomplete-logic-attempt2
autocomplete logic attempt 2, fixes #10695
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/text_edit.cpp4
-rw-r--r--scene/gui/text_edit.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 2ca4c81319..d30e0b9f25 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -4266,6 +4266,10 @@ bool TextEdit::is_insert_mode() const {
return insert_mode;
}
+bool TextEdit::is_insert_text_operation() {
+ return (current_op.type == TextOperation::TYPE_INSERT);
+}
+
uint32_t TextEdit::get_version() const {
return current_op.version;
}
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index 68ef559f46..7e61c4e8b1 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -386,6 +386,8 @@ public:
void begin_complex_operation();
void end_complex_operation();
+ bool is_insert_text_operation();
+
void set_text(String p_text);
void insert_text_at_cursor(const String &p_text);
void insert_at(const String &p_text, int at);