|
@@ -3544,6 +3544,19 @@ void TextEdit::insert_text_at_caret(const String &p_text, int p_caret) {
|
|
|
|
|
|
adjust_carets_after_edit(i, new_line, new_column, from_line, from_col);
|
|
|
}
|
|
|
+
|
|
|
+ if (!ime_text.is_empty()) {
|
|
|
+ for (int i = 0; i < carets.size(); i++) {
|
|
|
+ String t;
|
|
|
+ if (get_caret_column(i) >= 0) {
|
|
|
+ t = text[get_caret_line(i)].substr(0, get_caret_column(i)) + ime_text + text[get_caret_line(i)].substr(get_caret_column(i), text[get_caret_line(i)].length());
|
|
|
+ } else {
|
|
|
+ t = ime_text;
|
|
|
+ }
|
|
|
+ text.invalidate_cache(get_caret_line(i), get_caret_column(i), true, t, structured_text_parser(st_parser, st_args, t));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
end_complex_operation();
|
|
|
queue_redraw();
|
|
|
}
|