Skip to content

Emmet balance In after balance out should go back to initial selection and not first child #49777

Closed

Description

Using emmet's balance in after using balance out shrinks to incorrect selection.

Current Behavior:
2018-05-13_16-10-42

Expected Behavior:
Currently balance in selects just the first child element for the selected tag. It should select in the order reverse of balance out.

Version 1.23.1
Commit d0182c3
Date 2018-05-10T17:11:17.614Z
Shell 1.7.12
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64

Activity

  1. added
    emmet
    on May 13, 2018
  2. Maxhodges commented on May 14, 2018

    @Maxhodges

    good lord why doesn't the VS code team just make this work correctly!
    #4795 (comment)

  3. ramya-rao-a commented on May 15, 2018

    @ramya-rao-a
    Contributor

    Ananto Ghosh (@anantoghosh)

    Currently balance in selects just the first child element for the selected tag.

    This is consistent with balance feature as documented in https://docs.emmet.io/actions/match-pair/

    It should select in the order reverse of balance out.

    It currently doesn't work that way as we don't keep the history of the selections. Each Balance In/Out command is unaware of what happens before or after it.

    PRs are welcome to make the change so that Balance In after a series of Balance outs, gets back to the initial selection.

    Code pointer: https://github.com/Microsoft/vscode/blob/release/1.23/extensions/emmet/src/balance.ts

  4. added
    help wanted
    feature-request
    on May 15, 2018
  5. changed the title [-]Emmet balance In does not behave correctly after balance out[/-] [+]Emmet balance In after balance out should go back to initial selection and not first child[/+] on May 15, 2018
  6. Heldenkrieger01 commented on May 23, 2018

    @Heldenkrieger01
    Contributor

    I've made a pull request for this Issue. #49996

  7. ramya-rao-a commented on May 23, 2018

    @ramya-rao-a
    Contributor

    Thanks Christian Thalmann (@Heldenkrieger01)
    I have assigned it to the current milestone, and get to it this week

  8. added a commit that references this issue on May 30, 2018
    30bcdff
  9. ramya-rao-a commented on May 30, 2018

    @ramya-rao-a
    Contributor

    Christian Thalmann (@Heldenkrieger01) I had to make some changes over your PR. Do take a look.

    The fix has been merged.

    Ananto Ghosh (@anantoghosh) Max Hodges (@Maxhodges) Can you give it a try in tomorrow's Insiders?

  10. Maxhodges commented on May 30, 2018

    @Maxhodges

    excellent! Sure I'll be happy to test!

  11. added
    verification-needed
    on May 30, 2018
  12. anantoghosh commented on Jun 8, 2018

    @anantoghosh
    ContributorAuthor

    Tried it out. It's working well! Thanks 😄

  13. ramya-rao-a commented on Jun 8, 2018

    @ramya-rao-a
    Contributor
  14. locked and limited conversation to collaborators on Jul 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

emmetfeature-requesthelp wantedverification-neededverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions