microsoft / microsoft/terminal
Implement more modern word-wise cursor navigations
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
# Description of the new feature/enhancement
Conhost and Windows Terminal currently use the classic Windows algorithm, which is also used by Notepad and Visual Studio. Given 3 classes of characters - whitespace, delimiters and regular text - it works something like this:
* Forward navigation:
* Skip text until (after) you encounter a different character class
* Skip whitespace
* Backward navigation:
* Skip whitespace
* Skip text until (before) you encounter a different character class
In comparison Visual Studio Code's navigation works like this:
* Forward navigation:
* Skip whitespace
* Skip 1 glyph
* Skip text until (before) you encounter a different character class
* Backward navigation:
* Skip whitespace
* Skip 1 glyph
* Skip text until (before) you encounter a different character class
Due to this symmetry navigating forward/backward will produce consistent and identical results. It'll feel more "intuitive" to new users.
# Risk
People can be _very_ picky about changes to our word selection algorithm. Double-clicking words needs to behave similar/identical to before. Cursor navigation needs to be at least so close that no one will feel bothered by it. There should be an opt-out if not at least via a registry key, just in case things go bad.
Contributor guide
Research direction
No files, tests, or entry points are named. Start by comparing the current cursor-navigation behavior with the symmetric Visual Studio Code algorithm described here, while checking that double-click word selection remains unchanged. Done should include consistent forward and backward navigation plus an opt-out mechanism if the new behavior causes problems.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100