浏览代码

Fix find word bug.

/main
Yuncong Zhang 5 年前
当前提交
b772a6ac
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 6
      Runtime/ui/txt/paragraph.cs

6
Runtime/ui/txt/paragraph.cs


Layout layout = new Layout();
layout.setTabStops(this._tabStops);
TextBlobBuilder builder = new TextBlobBuilder();
GlyphPosition[] glyphPositions = new GlyphPosition[this._text.Length + this._paragraphStyle.ellipsis.Length];
GlyphPosition[] glyphPositions = new GlyphPosition[this._text.Length + (this._paragraphStyle.ellipsis?.Length ?? 0)];
int pGlyphPositions = 0;
for (int lineNumber = 0; lineNumber < lineLimit; ++lineNumber) {

Range<int>[] _findWords(int start, int end) {
var inWord = false;
int wordCount = 0;
int wordStart = 0;
wordStart = i;
inWord = true;
}
else if (inWord && isSpace) {

}
Range<int>[] words = new Range<int>[wordCount];
inWord = false;
int wordStart = 0;
for (int i = start; i < end; ++i) {
bool isSpace = LayoutUtils.isWordSpace(this._text[i]);

正在加载...
取消
保存