Skip to content

Commit 600b4f6

Browse files
committed
added undo/redo
1 parent 92fed20 commit 600b4f6

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

CHANGELOG.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
3939
- Line insert/delete (newline split/merge)
4040
- All operations recorded with cursor position for accurate restoration
4141
- **Architecture**:
42-
- New module: `src/loki_undo.c` (447 lines) and `src/loki_undo.h`
42+
- New module: `src/loki_undo.c` (474 lines) and `src/loki_undo.h` (92 lines)
4343
- Opaque `struct undo_state` - private implementation detail
4444
- State stored in `editor_ctx_t.undo_state`
4545
- Zero-dependency implementation (standard library only)
@@ -66,7 +66,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6666
- **Files Modified**:
6767
- Added: `src/loki_undo.c`, `src/loki_undo.h`, `UNDO.md` (design document)
6868
- Modified: `src/loki_core.c` (undo recording), `src/loki_modal.c` (keybindings), `src/loki_internal.h` (undo_state field), `CMakeLists.txt` (build integration)
69-
- **Design Documentation**: `UNDO.md` includes complete architecture analysis, implementation phases, future enhancements (undo tree, persistent undo), and estimated effort (~900 lines, 5-8 days)
69+
- **Design Documentation**: `UNDO.md` (921 lines) includes complete architecture analysis, implementation phases, future enhancements (undo tree, persistent undo), memory/performance analysis, and testing strategy
7070

7171
- **Command Mode (Vim-style :commands)**: Complete implementation of ex-mode command system
7272
- **Built-in Commands** (10 commands implemented in `src/loki_command.c`):
@@ -105,7 +105,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
105105
end, "Insert current timestamp")
106106
```
107107
- **Architecture**:
108-
- New module: `src/loki_command.c` (491 lines) and `src/loki_command.h`
108+
- New module: `src/loki_command.c` (491 lines) and `src/loki_command.h` (100 lines)
109109
- Command state stored in `editor_ctx_t` (cmd_buffer, cmd_length, cmd_cursor_pos, cmd_history_index)
110110
- Integrated with modal system via `MODE_COMMAND` enum value
111111
- Dual registry: built-in commands (static table) + dynamic commands (Lua-registered)
@@ -122,20 +122,29 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
122122
### Documentation
123123

124124
- **Design Documents**:
125-
- Added `COMMAND.md` - Complete design rationale and implementation guide for command mode system
125+
- Added `COMMAND.md` (883 lines) - Complete design rationale and implementation guide for command mode system
126126
- Architecture analysis (Option A vs B: modal extension vs dedicated module)
127-
- Detailed implementation structure with code examples
127+
- Detailed implementation structure with code examples (~600 lines of sample code)
128128
- Integration patterns with modal system and Lua
129129
- Testing strategy with example test cases
130-
- Justification for modular approach (~350 lines for maintainability)
131-
- Added `TREE-SITTER.md` - Analysis of tree-sitter syntax highlighting integration
130+
- Build system integration
131+
- Justification for modular approach (estimated ~350 lines implementation)
132+
- Added `TREE-SITTER.md` (500 lines) - Analysis of tree-sitter syntax highlighting integration
132133
- Current architecture vs tree-sitter comparison
133134
- Dual-mode architecture proposal (opt-in per language)
134-
- Complete implementation guide (~400 lines)
135+
- Complete implementation guide with code examples
135136
- Build system integration with CMake flags
136-
- Trade-offs analysis: accuracy vs complexity
137+
- Trade-offs analysis: accuracy (95%) vs complexity/dependencies
137138
- **Recommendation: NOT to implement** - complexity/maintenance burden outweighs accuracy gains for minimalist editor
138139
- Alternative: hybrid approach using tree-sitter for specific features only
140+
- Added `UNDO.md` (921 lines) - Complete undo/redo system design and analysis
141+
- Architecture comparison: extend loki_core.c vs dedicated module
142+
- Complete implementation with code examples
143+
- Memory and performance analysis
144+
- Grouping strategy and heuristics
145+
- Testing strategy with example test cases
146+
- Future enhancements: undo tree, persistent undo, visualization
147+
- Implementation phases breakdown (estimated 5-8 days, ~900 lines)
139148

140149
## [0.4.6] - 2025-01-12
141150

0 commit comments

Comments
 (0)