浏览代码

Merge pull request #286 from UnityTech/fix_editing_bug

Fix bug in paragraph.
/main
GitHub 5 年前
当前提交
e9141ee4
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 6
      Runtime/ui/txt/paragraph.cs

6
Runtime/ui/txt/paragraph.cs


public List<TextBox> getRectsForRange(int start, int end) {
var lineBoxes = new SplayTree<int, List<TextBox>>();
foreach (var run in this._codeUnitRuns) {
for (int runIndex = 0; runIndex < this._codeUnitRunsCount; runIndex++) {
var run = this._codeUnitRuns[runIndex];
if (run.codeUnits.start >= end) {
break;
}

}
TextDirection direction = TextDirection.ltr;
foreach (var run in this._codeUnitRuns) {
for (int runIndex = 0; runIndex < this._codeUnitRunsCount; runIndex++) {
var run = this._codeUnitRuns[runIndex];
if (gp.codeUnit >= run.codeUnits.start && gp.codeUnit + 1 <= run.codeUnits.end) {
direction = run.direction;
break;

正在加载...
取消
保存