feat: implement undo/redo system with history tracking and tests

Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
Loic Coenen
2026-05-01 20:10:45 +00:00
parent b64b0cd418
commit be3582bc13
4 changed files with 702 additions and 8 deletions

14
tui.c
View File

@@ -735,6 +735,20 @@ void tui_run(Engine *engine) {
break;
}
case 'u': {
// Undo
engine_undo_action(engine);
engine_process_commands(engine);
break;
}
case 18: { // Ctrl+R (18 = 0x12)
// Redo
engine_redo_action(engine);
engine_process_commands(engine);
break;
}
case 27: // Escape key
case 'Q':
return;