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

Commit 4625642

Browse files
author
Yuncong Zhang
committed
Update comment
1 parent 6c88dae commit 4625642

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Runtime/service/text_input.cs

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

208208
if (selection != null && selection.start >= 0 && selection.end >= 0) {
209-
// handle emoji, which takes 2 bytes
209+
// handle surrogate pair emoji, which takes 2 utf16 chars
210210
// if selection cuts in the middle of the emoji, move it to the end
211211
int start = selection.start, end = selection.end;
212212
if (start < text.Length && char.IsLowSurrogate(text[start])) {

0 commit comments

Comments
 (0)