Add undo system with coalescing logic and comprehensive tests.

- Implemented robust undo system supporting coalescing of text operations (insert, backspace, delete).
- Added `UndoSystem` integration into the editor/commands pipeline.
- Wrote extensive unit tests for various undo/redo scenarios, including multiline operations, cursor preservation, and history management.
- Refactored to ensure consistent cursor behavior during undo/redo actions.
- Updated CMake to include new tests.
This commit is contained in:
2026-02-10 22:39:55 -08:00
parent f3bdced3d4
commit ac0eadc345
6 changed files with 571 additions and 26 deletions

View File

@@ -302,6 +302,7 @@ if (BUILD_TESTS)
tests/test_piece_table.cc
tests/test_search.cc
tests/test_reflow_paragraph.cc
tests/test_undo.cc
tests/test_visual_line_mode.cc
# minimal engine sources required by Buffer