public void Clear(LineToIndexTable lti) { for (int i = 0; i < lti.Count; i++) { lti.GetRaw(i).Syntax = null; } lti.ClearLayoutCache(); this._IsSync = false; }
private void HilightLine(LineToIndexTable lti, int row) { //シンタックスハイライトを行う List <SyntaxInfo> syntax = new List <SyntaxInfo>(); string str = lti[row]; int level = this.Hilighter.DoHilight(str, str.Length, (s) => { if (s.type == TokenType.None || s.type == TokenType.Control) { return; } if (str[s.index + s.length - 1] == Document.NewLine) { s.length--; } syntax.Add(new SyntaxInfo(s.index, s.length, s.type)); }); LineToIndexTableData lineData = lti.GetRaw(row); lineData.Syntax = syntax.ToArray(); }