FastColoredTextBoxNS.InsertCharCommand.BreakLines C# (CSharp) Method

BreakLines() static private method

static private BreakLines ( int iLine, int pos, TextSource ts ) : void
iLine int
pos int
ts TextSource
return void
        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);
        }