summaryrefslogtreecommitdiffstats
path: root/editor
diff options
context:
space:
mode:
authorkit <kitbdev@gmail.com>2024-01-22 12:34:12 -0500
committerkit <kitbdev@gmail.com>2024-01-29 15:07:19 -0500
commita6af442b05b38ed3baa716ec0a73862a024e141a (patch)
tree2ed9b13dd6ad20c47108a8a2ea10e256475f5dac /editor
parentfa48a51183567934984b381ad8ec281cb24d66ba (diff)
downloadredot-engine-a6af442b05b38ed3baa716ec0a73862a024e141a.tar.gz
Apply TextEdit IME on most actions
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/script_text_editor.cpp3
-rw-r--r--editor/plugins/text_editor.cpp3
-rw-r--r--editor/plugins/text_shader_editor.cpp4
3 files changed, 10 insertions, 0 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index d8fb55ca54..04228c4410 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -1270,6 +1270,7 @@ void ScriptTextEditor::_gutter_clicked(int p_line, int p_gutter) {
void ScriptTextEditor::_edit_option(int p_op) {
CodeEdit *tx = code_editor->get_text_editor();
+ tx->apply_ime();
switch (p_op) {
case EDIT_UNDO: {
@@ -1960,6 +1961,8 @@ void ScriptTextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
}
if (create_menu) {
+ tx->apply_ime();
+
Point2i pos = tx->get_line_column_at_pos(local_pos);
int row = pos.y;
int col = pos.x;
diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp
index a2364278b6..c9a0cbd2de 100644
--- a/editor/plugins/text_editor.cpp
+++ b/editor/plugins/text_editor.cpp
@@ -348,6 +348,7 @@ void TextEditor::set_find_replace_bar(FindReplaceBar *p_bar) {
void TextEditor::_edit_option(int p_op) {
CodeEdit *tx = code_editor->get_text_editor();
+ tx->apply_ime();
switch (p_op) {
case EDIT_UNDO: {
@@ -502,6 +503,8 @@ void TextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
if (mb->get_button_index() == MouseButton::RIGHT) {
CodeEdit *tx = code_editor->get_text_editor();
+ tx->apply_ime();
+
Point2i pos = tx->get_line_column_at_pos(mb->get_global_position() - tx->get_global_position());
int row = pos.y;
int col = pos.x;
diff --git a/editor/plugins/text_shader_editor.cpp b/editor/plugins/text_shader_editor.cpp
index 98d83b6e95..e158709a75 100644
--- a/editor/plugins/text_shader_editor.cpp
+++ b/editor/plugins/text_shader_editor.cpp
@@ -628,6 +628,8 @@ ShaderTextEditor::ShaderTextEditor() {
/*** SCRIPT EDITOR ******/
void TextShaderEditor::_menu_option(int p_option) {
+ shader_editor->get_text_editor()->apply_ime();
+
switch (p_option) {
case EDIT_UNDO: {
shader_editor->get_text_editor()->undo();
@@ -978,6 +980,8 @@ void TextShaderEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
if (mb->get_button_index() == MouseButton::RIGHT && mb->is_pressed()) {
CodeEdit *tx = shader_editor->get_text_editor();
+ tx->apply_ime();
+
Point2i pos = tx->get_line_column_at_pos(mb->get_global_position() - tx->get_global_position());
int row = pos.y;
int col = pos.x;