internal static void BreakLines(int iLine, int pos, FastColoredTextBox tb) { Line newLine = new Line(tb.GenerateUniqueLineId()); for (int i = pos; i < tb[iLine].Count; i++) { newLine.Add(tb[iLine][i]); } tb[iLine].RemoveRange(pos, tb[iLine].Count - pos); tb.InsertLine(iLine + 1, newLine); }
internal static void BreakLines(int iLine, int pos, FastColoredTextBox tb) { Line newLine = new Line(); for (int i = pos; i < tb.lines[iLine].Count; i++) { newLine.Add(tb.lines[iLine][i]); } tb.lines[iLine].RemoveRange(pos, tb.lines[iLine].Count - pos); tb.lines.Insert(iLine + 1, newLine); }
internal static void BreakLines(int iLine, int pos, TextSource ts) { Line newLine = ts.CreateLine(); for (int i = pos; i < ts[iLine].Count; i++) { newLine.Add(ts[iLine][i]); } ts[iLine].RemoveRange(pos, ts[iLine].Count - pos); // ts.InsertLine(iLine + 1, newLine); }
internal static void BreakLines(int iLine, int pos, TextSource ts) { Line newLine = ts.CreateLine(); if (ts.CurrentTB.AllowTabs) { string deTabbed = ts[iLine].ToText(pos); ts[iLine].RemoveRange(pos, ts[iLine].Count - pos); newLine.AddTabified(deTabbed); } else { for (int i = pos; i < ts[iLine].Count; i++) { newLine.Add(ts[iLine][i]); } ts[iLine].RemoveRange(pos, ts[iLine].Count - pos); } // ts.InsertLine(iLine + 1, newLine); }