public UndoableCommand(TextSource ts)
 {
     this.ts = ts;
     sel     = new RangeInfo(ts.CurrentTB.Selection);
 }
 public CommandManager(TextSource ts)
 {
     history    = new LimitedStack <UndoableCommand>(maxHistoryLength);
     TextSource = ts;
 }