浏览代码

bug fix when performing selection on multi-line paragraph

/main
xingwei.zhu 6 年前
当前提交
c6a37b73
共有 2 个文件被更改,包括 2 次插入3 次删除
  1. 3
      Runtime/rendering/paragraph.cs
  2. 2
      Runtime/widgets/selectable_text.cs

3
Runtime/rendering/paragraph.cs


if (kcmd == KeyCommand.Copy) {
Clipboard.setData(
new ClipboardData(text: this.selection.textInside(this.text.text))
new ClipboardData(text: this.selection.textInside(this.text.toPlainText()))
);
}
}

public void selectPositionAt(Offset from = null, Offset to = null, SelectionChangedCause? cause = null) {
D.assert(cause != null);
D.assert(from != null);
this._layoutText(this.constraints.maxWidth);
if (true) {
TextPosition fromPosition =
this._textPainter.getPositionForOffset(this.globalToLocal(from));

2
Runtime/widgets/selectable_text.cs


this.selectionColor = selectionColor;
}
SelectableText(TextSpan textSpan,
public SelectableText(TextSpan textSpan,
Key key = null,
TextStyle style = null,
TextAlign? textAlign = null,

正在加载...
取消
保存