core_editor: model the cursor as a range#1095
Conversation
Promote the helix range type to a crate-internal `Cursor` (anchor + head, gap-indexed) in core_editor, move `selection_anchor` from `Editor` into `LineBuffer`, and route `get_selection`/`select_all` through it. Behavior unchanged.
|
@sim590 @matystroia Since you are aware of the limitations and know the current behavior of Vi mode best, it would be amazing for you to follow my PRs coming in and check if they preserve behavior, or fix issues, depending on whats told in the PR body. I myself cant even wrap my head around simple Vi movements sometimes, since I never worked with it, so you would be a great help. This one is essentially a refactor and should preserve behavior (also the flaws we already have in Vi mode). Thanks in advance! |
Promote the helix range type to a crate-internal
Cursor(anchor + head, gap-indexed) in core_editor, moveselection_anchorfromEditorintoLineBuffer, and routeget_selection/select_allthrough it. Behavior unchanged.