Patent ID: 8627268

Claim:
A computer-implemented method comprising: sequentially receiving from a user a plurality of actions to modify a file, the plurality of actions including a first action, a second action, a third action, and a last received action, wherein the third action is successive to the second action, the second action is successive to the first action, and the last received action is the last action received from the user; sequentially storing a plurality of action descriptions in a program log, wherein each of the plurality of action descriptions correspond to one of the plurality of actions in the order that the plurality of actions were received, the plurality of action descriptions including a first action description, a second action description, and a third action description that correspond to the first action, the second action, and the third action, respectively; modifying the file by executing the plurality of actions in the order that they are received, the modifying further comprising: storing a first program state in the program log, the first program state corresponding to the file prior to executing the first action; storing a second program state in the program log, the second program state corresponding to the file after executing the first action; and storing a third program state in the program log, the third program state corresponding to the file after executing the second action; receiving, after the modifying, an undo request corresponding to the first action; in response to receiving the undo request, the method further comprises: removing the first action description from the program log without removing the last action description; associating the second action description to the first program state in response to removing the first action description from the program log; updating the third program state in response to associating the second action description to the first program state, the updating resulting in an updated third program state; determining whether the third action description is independent of the first action description; in response to determining that the third action description is independent of the first action description, associating the updated third program state to the third action description; in response to determining that the third action description is dependent upon the first action description, removing the third action description from the program log; and modifying the file by undoing the first action without undoing the last action.