Double/Triple clicking and dragging should select words/lines
- Dominant language
- Rust
- Stars
- 14.6k
- Forks
- 734
- Avg merge
- 8h 40m
- Merged PRs (30d)
- 4
Description
Double click a word but continue holding the mouse down and drag it across the document.
Right now, this will cancel the word-selection and continue a regular char-wise selection. Other editors continue with a word-wise selection. For triple-clicks this should do a line-wise selection.
Changes are needed here to keep the click counter state into a drag:
https://github.com/microsoft/edit/blob/b008570afc0c4c6cef7ba0335d407139a47c8e24/src/tui.rs#L554-L611
And here to continue to change the word-selection mode during dragging:
https://github.com/microsoft/edit/blob/b008570afc0c4c6cef7ba0335d407139a47c8e24/src/tui.rs#L2188-L2206
Contributor guide
Research direction
Read the click handling in src/tui.rs around lines 554-611, then follow the dragging selection logic around lines 2188-2206. Preserve double- and triple-click state during dragging so word-wise and line-wise selection continue across the document, and verify that ordinary character-wise dragging remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100