synchronized void undo(RTEditText editor){
  Stack<Operation> undoStack=getUndoStack(editor);
  if (!undoStack.empty()) {
    Stack<Operation> redoStack=getRedoStack(editor);
    Operation op=undoStack.pop();
    push(op,redoStack);
    op.undo(editor);
    while (!undoStack.empty() && op.canMerge(undoStack.peek())) {
      op=undoStack.pop();
      push(op,redoStack);
      op.undo(editor);
    }
  }
}

synchronized void undo ( RTEditText editor ) { Stack < Operation > undoStack = getUndoStack ( editor ) ; if ( ! undoStack . empty ( ) ) { Stack < Operation > redoStack = getRedoStack ( editor ) ; Operation op = undoStack . pop ( ) ; push ( op , redoStack ) ; op . undo ( editor ) ; while ( ! undoStack . empty ( ) && op . canMerge ( undoStack . peek ( ) ) ) { op = undoStack . pop ( ) ; push ( op , redoStack ) ; op . undo ( editor ) ; } } }
undo the last operation for a specific rich text editor
