public static char MyValidate( char c, int charIndex, bool isPasting, List <IndentLevel> toAddLevels, string currentText, IDETextField theTextField) { if (isPasting) { return(c); } if (c == '\n') { toAddLevels.Clear(); toAddLevels.Add(new IndentLevel(charIndex, IDEParser.GetIndentLevel(charIndex, currentText))); theTextField.SetNewCaretPos(toAddLevels[0].GetNewCaretPos()); return('\n'); } return(c); }
public void SelectEndOfLine(int lineNumber) { theTextField.SetNewCaretPos(IDEParser.CalcSelectedLineLastIndex(lineNumber, theInputField.text)); }