Skip to content

Refactor Word Expansion in TextBuffer #4423

Closed

Description

Description of the new feature/enhancement

In #4018, word navigation for selection and accessibility is merged into this mess:

  • GetWordEnd (with accessibilityMode flag)
  • GetWordStart (with accessibilityMode flag)
  • MoveToNextWord
  • MoveToPreviousWord

There has to be a way to combine all of these into just 2 functions (or 4 with an accessibilityMode flag). Unfortunately, doing so at the time could have resulted in breaking Selection for the sake of Accessibility (if one was not careful). So here's a work item to refactor that and make it look waaaaay better.

Proposed technical implementation details (optional)

There's a good amount of repeated code/concepts throughout these functions. I think we should just rely on making the function return a bool and have an in/out param.

Activity

  1. added
    Issue-TaskIt's a feature request, but it doesn't really need a major design.
    Area-CodeHealthIssues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.
    on Jan 31, 2020
  2. ghost added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Jan 31, 2020
  3. added a commit that references this issue on Mar 13, 2026
    040c730
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Area-CodeHealthIssues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.In-PRThis issue has a related PRIssue-TaskIt's a feature request, but it doesn't really need a major design.Needs-Tag-FixDoesn't match tag requirementsProduct-TerminalThe new Windows Terminal.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions