You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/UserGuide.md
+5-2
Original file line number
Diff line number
Diff line change
@@ -229,6 +229,7 @@ The `undo` command allows you to reverse the last action performed, helping you
229
229
230
230
1.**Use Undo After a Mistake**: If you accidentally delete or modify a contact, you can quickly use `undo` to revert the last action and restore the previous state. <br>
231
231
2.**Undo Works Only for Modifying Commands**: Only actions that modify the address book (like `add`, `edit`, or `delete`) can be undone. Commands like `list`, `filter`, or `find` do not trigger the undo mechanism. The reasoning behind this is that we consider them as view commands, not action commands that alter student data.
232
+
3.**Undo Resets to Full View**: After using `undo`, the program will display all students in the address book, letting you confirm that your last change has been successfully reverted.
232
233
</div>
233
234
234
235
<divmarkdown="span"class="alert alert-secondary">
@@ -280,6 +281,8 @@ The `redo` command allows you to reapply the last action that was undone, restor
280
281
281
282
1.**Use Redo to Restore Actions**: If you’ve undone an action by mistake, `redo` lets you reapply the change quickly. It’s useful when you second-guess your decision.
282
283
2.**Redo Works Only After Undo**: `redo` will only work if an action has been undone previously. If you haven’t undone an action, `redo` will not perform anything.
284
+
3.**Redo Resets to Full View**: After using `redo`, the program will show all students in the address book, allowing you to verify that your last action has been reapplied successfully.
285
+
283
286
</div>
284
287
285
288
<divmarkdown="span"class="alert alert-secondary">
@@ -293,10 +296,10 @@ Why does `redo` not work after I’ve made new changes to the address book? <br>
293
296
Executing a command that modifies the address book (like `add`, `edit`, or `delete`) will **clear the redo stack**. This means once you undo a change and then modify the address book again, you will lose the ability to redo the previous undone action.
294
297
</div>
295
298
296
-
#### Example Scenario:
299
+
#### Example Scenario (Continuation from Undo):
297
300
1. You undo a deletion of a contact.
298
301
-*After Undo:*[After Undo Command] – The deleted contact is restored.
299
-
2. You decide to redo the action and restore the contact again.
302
+
2. You decide to redo the action and delete the contact again.
300
303
-*After Redo:*[After Redo Command] – The contact is deleted once more.
0 commit comments