check the docs in @docs and check the current state of the codebase, lets cleanup old stuff from the roadmap, update changelog, and figure out what is missing in our multi cursor select and navigation imeplementation, i see we cannot move them all at the same time, but they will insert chars on each cursor etc, consult oracle and use searcher agent to investigate and make a concrete action plan on getting the multi-cursor features mostly finished
Multi-cursor select navigation implementation review
Here's the summary of what was done:
Summary
Multi-Cursor Movement Gap Identified
Root cause: All movement handlers use cursor_mut() which always returns &mut cursors[0] (primary cursor only). Multi-cursor editing works (insert/delete), but movement doesn't.
Created Implementation Plan
feature/MULTI_CURSOR_MOVEMENT.md with 5 phases:
| Phase | Description | Effort |
|---|---|---|
| 0 | Per-cursor primitives (move_cursor_*_at(idx)) |
Low |
| 1 | All-cursors wrappers (move_all_cursors_*()) |
Low |
| 2 | Update movement handlers in update.rs | Medium |
| 3 | Selection movement helpers (*_with_selection) |
Low |
| 4 | Update Shift+Arrow handlers | Low |
| 5 | Per-line whitespace helpers | Low |
| Phase | Description | Effort |
|---|---|---|
| 0 | Per-cursor primitives (move_cursor_*_at(idx)) |
Low |
| 1 | All-cursors wrappers (move_all_cursors_*()) |
Low |
| 2 | Update movement handlers in update.rs | Medium |
| 3 | Selection movement helpers (*_with_selection) |
Low |
| 4 | Update Shift+Arrow handlers | Low |
| 5 | Per-line whitespace helpers | Low |
Total effort: ~1-3 hours
Docs Cleaned Up
- ROADMAP.md: Reorganized with "In Progress" section for multi-cursor movement, removed verbose completed items
- CHANGELOG.md: Added entry documenting the identified gap and plan
Key Implementation Points
- Add index-based helpers to
EditorState:move_cursor_left_at(doc, idx) - Add all-cursors wrappers:
move_all_cursors_left(doc)that iterate + deduplicate - Update each
MoveCursor*handler to use new methods - Add selection variants for Shift+movement
- Every multi-cursor operation ends with
deduplicate_cursors()
lets start implementing
Summary
Multi-cursor movement is now fully implemented:
Changes Made
src/model/editor.rs - Added ~400 lines:
- Per-cursor primitives:
move_cursor_left_at(),move_cursor_right_at(),move_cursor_up_at(),move_cursor_down_at(),move_cursor_line_start_at(),move_cursor_line_end_at(),move_cursor_document_start_at(),move_cursor_document_end_at(),move_cursor_word_left_at(),move_cursor_word_right_at(),page_up_at(),page_down_at() - All-cursors wrappers:
move_all_cursors_*()for each primitive - Selection variants:
move_all_cursors_*_with_selection()for Shift+movement
src/update.rs - Refactored handlers:
- All
MoveCursor*handlers now use new all-cursors methods - Removed ~125 lines of legacy single-cursor movement functions
- Cleaner code with scoped borrows
tests/cursor_movement.rs - 10 new tests:
test_multi_cursor_arrow_left_moves_alltest_multi_cursor_arrow_right_moves_alltest_multi_cursor_arrow_up_moves_alltest_multi_cursor_arrow_down_moves_alltest_multi_cursor_movement_deduplicates_on_collisiontest_multi_cursor_home_moves_alltest_multi_cursor_end_moves_alltest_multi_cursor_word_right_moves_alltest_multi_cursor_selection_extends_alltest_multi_cursor_vertical_preserves_desired_column
Test count: 383 total (was 351)
whats next?
Here are the planned features in priority order:
| Feature | Complexity | Description |
|---|---|---|
| Expand/Shrink Selection | Small | Option+Up/Down to expand word→line→all, with history stack |
| File Dropping | Medium | Drag-and-drop files onto window to open them |
| Workspace Management | Large | CLI args (red file1 file2), file tree sidebar, FS watching |
| Codebase Organization | Medium | Split main.rs (~3100 lines) and update.rs (~2800 lines) into modules |
| Undo Coalescing | Small | Group rapid keystrokes into single undo entries |
| Feature | Complexity | Description |
|---|---|---|
| Expand/Shrink Selection | Small | Option+Up/Down to expand word→line→all, with history stack |
| File Dropping | Medium | Drag-and-drop files onto window to open them |
| Workspace Management | Large | CLI args (red file1 file2), file tree sidebar, FS watching |
| Codebase Organization | Medium | Split main.rs (~3100 lines) and update.rs (~2800 lines) into modules |
| Undo Coalescing | Small | Group rapid keystrokes into single undo entries |
Deferred items (from Split View):
- Splitter drag resize
- Tab drag-and-drop between groups
- Cursor adjustment when other views edit same document
Which would you like to tackle next?
check if they are actually implemeneted or not (check the code to see if its already implemented) and update changelog/roadmap if outdated.
Summary
Updated docs to reflect that Expand/Shrink Selection was already implemented:
Features Already Complete (docs now updated)
| Feature | Tests | Keybindings |
|---|---|---|
| Expand/Shrink Selection | 18 tests | Option+Up/Down |
| Multi-Cursor Movement | 10 tests | Arrow keys, Home/End, etc. |
| Feature | Tests | Keybindings |
|---|---|---|
| Expand/Shrink Selection | 18 tests | Option+Up/Down |
| Multi-Cursor Movement | 10 tests | Arrow keys, Home/End, etc. |
Still Planned
| Feature | Description |
|---|---|
| File Dropping | Drag-and-drop files onto window |
| Workspace Management | CLI args, file tree sidebar, FS watching |
| Codebase Organization | Split main.rs (3108 lines) and update.rs (2977 lines) |
| Undo Coalescing | Group rapid keystrokes into single undo |
| Feature | Description |
|---|---|
| File Dropping | Drag-and-drop files onto window |
| Workspace Management | CLI args, file tree sidebar, FS watching |
| Codebase Organization | Split main.rs (3108 lines) and update.rs (2977 lines) |
| Undo Coalescing | Group rapid keystrokes into single undo |
Deferred (from Split View)
- Splitter drag resize
- Tab drag-and-drop
- Cursor adjustment when other views edit same document