Skip to content

Commit

Permalink
Fix issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuncong Zhang committed Jun 13, 2019
1 parent a35777b commit a78ca0f
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Runtime/service/text_input.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public TextEditingValue(string text = "", TextSelection selection = null, TextRa
this.text = text;
this.composing = composing ?? TextRange.empty;

if (selection != null) {
if (selection != null && selection.start >= 0 && selection.end >= 0) {
// handle emoji, which takes 2 bytes
// if selection cuts in the middle of the emoji, move it to the end
int start = selection.start, end = selection.end;
Expand Down
52 changes: 49 additions & 3 deletions Tests/Resources/india_chettinad_silk_maker.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 49 additions & 3 deletions Tests/Resources/india_thanjavur_market.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a78ca0f

Please sign in to comment.