Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement more modern word-wise cursor navigations #15787

Open
lhecker opened this issue Aug 1, 2023 · 3 comments
Open

Implement more modern word-wise cursor navigations #15787

lhecker opened this issue Aug 1, 2023 · 3 comments
Labels
Area-CookedRead The cmd.exe COOKED_READ handling Issue-Task It's a feature request, but it doesn't really need a major design. Needs-Tag-Fix Doesn't match tag requirements Product-Conhost For issues in the Console codebase Product-Terminal The new Windows Terminal.

Comments

@lhecker
Copy link
Member

lhecker commented Aug 1, 2023

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.

@lhecker lhecker added Product-Conhost For issues in the Console codebase Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Product-Terminal The new Windows Terminal. Issue-Task It's a feature request, but it doesn't really need a major design. Area-CookedRead The cmd.exe COOKED_READ handling labels Aug 1, 2023
@carlos-zamora carlos-zamora removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Aug 2, 2023
@carlos-zamora carlos-zamora added this to the Backlog milestone Aug 2, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Aug 2, 2023
@chrisant996
Copy link

@lhecker This is referring only to processed input mode in ReadConsole(), right?

@DHowett
Copy link
Member

DHowett commented Aug 3, 2023

Yup!

@carlos-zamora
Copy link
Member

Screen readers also use the other kind of word navigation. So, when a user is navigating the buffer, it also feels really different and confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-CookedRead The cmd.exe COOKED_READ handling Issue-Task It's a feature request, but it doesn't really need a major design. Needs-Tag-Fix Doesn't match tag requirements Product-Conhost For issues in the Console codebase Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

4 participants