public CommandManager(TextSource ts) { history = new LimitedStack<UndoableCommand>(maxHistoryLength); TextSource = ts; }