public override void Undo()
{
ts.CurrentTB.BeginUpdate();
ts.CurrentTB.Selection.BeginUpdate();
try
{
for (int i = commandsByRanges.Count - 1; i >= 0; i--)
commandsByRanges[i].Undo();
}
finally
{
ts.CurrentTB.Selection.EndUpdate();
ts.CurrentTB.EndUpdate();
}
ts.CurrentTB.Selection = range.Clone();
ts.CurrentTB.OnTextChanged(range);
ts.CurrentTB.OnSelectionChanged();
ts.CurrentTB.Selection.ColumnSelectionMode = true;
}