Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Skip over tag attributes when selecting inside tags #302

Merged
merged 1 commit into from
Jul 27, 2017

Conversation

50Wliu
Copy link
Contributor

@50Wliu 50Wliu commented Jul 27, 2017

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

When selecting inside tags, grab the full range of the tag rather than just the tag name range. This change allows the attributes to be skipped, leading to the actual area between tags being highlighted.

Alternate Designs

None.

Benefits

Using the bracket-matcher:select-inside-brackets command will work correctly for tags with attributes.

Possible Drawbacks

There may be a slight performance decrease compared to before when the cursor is currently on a tag. This is because we have to re-search for the tags in order to get the full range (i.e. there is no way that I know of to grab the full range from the existing range).

Applicable Issues

Fixes #117

@50Wliu 50Wliu merged commit 0dc4a1e into master Jul 27, 2017
@50Wliu 50Wliu deleted the wl-select-inside-tags-with-attributes branch July 27, 2017 03:06
ungb pushed a commit that referenced this pull request Aug 7, 2017
…attributes"

This reverts commit 0dc4a1e, reversing
changes made to 4665d66.
@bartocc
Copy link

bartocc commented Aug 31, 2017

This PR seems to have been merged and then reverted. So it appears it is not part of the current v0.87.3 release, right ?

Did something go wrong and is this fix likely to land soon ?

Thx

@Ben3eeE
Copy link
Contributor

Ben3eeE commented Aug 31, 2017

@bartocc There was a performance regression so we had to revert some PRs.

/cc: @ungb Was this reverted because of the performance regression? Can it be added back safely or would it require changes?

@50Wliu
Copy link
Contributor Author

50Wliu commented Aug 31, 2017

There were merge conflicts after the revert. Otherwise should be able to be added back safely. (Also, see #304)

@Ben3eeE Ben3eeE restored the wl-select-inside-tags-with-attributes branch August 31, 2017 18:08
@Ben3eeE Ben3eeE deleted the wl-select-inside-tags-with-attributes branch August 31, 2017 18:09
@Ben3eeE
Copy link
Contributor

Ben3eeE commented Aug 31, 2017

@bartocc We have a PR open to add this back now. Currently some specs are failing that we need to investigate. You may want to subscribe to #312 for updates.

I have also reopened the issue for this and it will be closed when #312 is merged.

@bartocc
Copy link

bartocc commented Sep 1, 2017

thx @Ben3eeE for pointing me to #312 !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Select inside brackets for HTML files doesn't consider HTML attributes
3 participants