Merge pull request #87479 from kitbdev/apply-ime

Fix TextEdit IME issues
This commit is contained in:
Rémi Verschelde 2024-02-13 17:23:55 +01:00
commit 48e2f43ccf
No known key found for this signature in database
GPG key ID: C3336907360768E1
7 changed files with 112 additions and 57 deletions

View file

@ -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;