Skip to content

Fix change surrounding tag, fixes #8177 #9648

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

Merged
merged 4 commits into from
May 27, 2025

Conversation

robertmoura
Copy link
Contributor

@robertmoura robertmoura commented May 26, 2025

Big thanks @J-Fields for maintaining this project 😊

What this PR does / why we need it:
Fixes a "change surrounding tag" issue when using kebab case

<custom-tag></custom-tag>

When using a command to replace the tag with h1 you get this:

<h1-tag></custom-h1>

Which issue(s) this PR fixes

Special notes for your reviewer:
What I've done to try fix the issue is created a new WordType of TagName. Currently it's using nextWordEnd and prevWordStart to select the tag name which is why we are getting that strange behaviour.

Copy link
Member

@J-Fields J-Fields left a comment

Choose a reason for hiding this comment

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

Thank you!

@J-Fields J-Fields merged commit 58f625e into VSCodeVim:master May 27, 2025
1 check passed
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.

2 participants