Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Commit a78ca0f

Browse files
author
Yuncong Zhang
committed
Fix issues.
1 parent a35777b commit a78ca0f

File tree

3 files changed

+99
-7
lines changed

3 files changed

+99
-7
lines changed

Runtime/service/text_input.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public TextEditingValue(string text = "", TextSelection selection = null, TextRa
205205
this.text = text;
206206
this.composing = composing ?? TextRange.empty;
207207

208-
if (selection != null) {
208+
if (selection != null && selection.start >= 0 && selection.end >= 0) {
209209
// handle emoji, which takes 2 bytes
210210
// if selection cuts in the middle of the emoji, move it to the end
211211
int start = selection.start, end = selection.end;

Tests/Resources/india_chettinad_silk_maker.png.meta

Lines changed: 49 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tests/Resources/india_thanjavur_market.png.meta

Lines changed: 49 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)