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

Edit: Only affix non-whitespace changes to ranges #2005

Merged
merged 2 commits into from
Nov 30, 2023

Conversation

umpox
Copy link
Contributor

@umpox umpox commented Nov 30, 2023

Description

We want to allow affixing non-whitespace characters and including that in the edit selection range (e.g. export before a function, or a JSDoc above an identifier).

We do not want to affix whitespace characters, as this may be from the user moving their cursor onto a different line, or repositioning the code.

Before

RangeBefore.mov

After

RangeAfter.mov

Test plan

  1. Create fixup

  2. Move cursor to start of range

  3. Enter non-whitespace characters and see range expands

  4. Create fixup

  5. Move cursor to start of range

  6. Enter whitespace characters and see range does not expand

@umpox umpox requested review from a team November 30, 2023 11:30
Copy link
Member

@valerybugakov valerybugakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense! Thanks for attaching the vids 🙌

@umpox umpox merged commit ba76890 into main Nov 30, 2023
13 checks passed
@umpox umpox deleted the tr/ignore-whitespace-affix branch November 30, 2023 12:40
@umpox umpox self-assigned this Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants