浏览代码

Fix delete bug.

/main
Yuncong Zhang 5 年前
当前提交
94eda57a
共有 2 个文件被更改,包括 19 次插入2 次删除
  1. 4
      Runtime/service/keyboard.cs
  2. 17
      Runtime/service/text_input.cs

4
Runtime/service/keyboard.cs


currentEvent.Use();
}
if (this._value != oldValue) {
if (this._value != oldValue) {
}
}
}
public void Dispose() {

17
Runtime/service/text_input.cs


return this;
}
if (char.IsHighSurrogate(this.text[this.selection.start - 1])) {
return this.copyWith(
text: this.text.Substring(0, this.selection.start - 1) +
this.text.Substring(this.selection.start + 1),
selection: TextSelection.collapsed(this.selection.start - 1),
composing: TextRange.empty);
}
if (char.IsLowSurrogate(this.text[this.selection.start - 1])) {
D.assert(this.selection.start > 1);
return this.copyWith(
text: this.text.Substring(0, this.selection.start - 2) +
this.selection.textAfter(this.text),
selection: TextSelection.collapsed(this.selection.start - 2),
composing: TextRange.empty);
}
return this.copyWith(
text: this.text.Substring(0, this.selection.start - 1) + this.selection.textAfter(this.text),
selection: TextSelection.collapsed(this.selection.start - 1),

正在加载...
取消
保存