diff --git a/source/blender/editors/space_text/text_ops.cc b/source/blender/editors/space_text/text_ops.cc index d2ae7b557f0..0a184a723f9 100644 --- a/source/blender/editors/space_text/text_ops.cc +++ b/source/blender/editors/space_text/text_ops.cc @@ -3603,7 +3603,8 @@ static int text_insert_invoke(bContext *C, wmOperator *op, const wmEvent *event) if (U.text_flag & USER_TEXT_EDIT_AUTO_CLOSE) { auto_close_char = BLI_str_utf8_as_unicode(str); - if (txt_has_sel(st->text) && text_closing_character_pair_get(auto_close_char) != 0 && + if (txt_has_sel(st->text) && isascii(auto_close_char) && + text_closing_character_pair_get(auto_close_char) != 0 && !text_span_is_blank(st->text->sell, st->text->selc, st->text->curl, st->text->curc)) { auto_close_select.sell = st->text->sell; @@ -3635,7 +3636,7 @@ static int text_insert_invoke(bContext *C, wmOperator *op, const wmEvent *event) ret = text_insert_exec(C, op); - if ((ret == OPERATOR_FINISHED) && (auto_close_char != 0)) { + if ((ret == OPERATOR_FINISHED) && (auto_close_char != 0) && isascii(auto_close_char)) { const uint auto_close_match = text_closing_character_pair_get(auto_close_char); if (auto_close_match != 0) { /* If there was a selection, move cursor to the end of it. */