You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Emmet balance In after balance out should go back to initial selection and not first child #49777
emmetEmmet related issuesfeature-requestRequest for new features or functionalityhelp wantedIssues identified as good community contribution opportunitiesverification-neededVerification of issue is requestedverifiedVerification succeeded
Using emmet's balance in after using balance out shrinks to incorrect selection.
Current Behavior:
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
Reacted by Max Hodges, Sobral and Christian Thalmann
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.
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
emmetEmmet related issuesfeature-requestRequest for new features or functionalityhelp wantedIssues identified as good community contribution opportunitiesverification-neededVerification of issue is requestedverifiedVerification succeeded
Activity
Maxhodges commentedon May 14, 2018
good lord why doesn't the VS code team just make this work correctly!
#4795 (comment)
ramya-rao-a commentedon May 15, 2018
Ananto Ghosh (@anantoghosh)
This is consistent with balance feature as documented in https://docs.emmet.io/actions/match-pair/
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
[-]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[/+]Heldenkrieger01 commentedon May 23, 2018
I've made a pull request for this Issue. #49996
ramya-rao-a commentedon May 23, 2018
Thanks Christian Thalmann (@Heldenkrieger01)
I have assigned it to the current milestone, and get to it this week
Fix #49777 - Emmet balance In after balance out should go back to ini…
ramya-rao-a commentedon May 30, 2018
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?
Maxhodges commentedon May 30, 2018
excellent! Sure I'll be happy to test!
anantoghosh commentedon Jun 8, 2018
Tried it out. It's working well! Thanks 😄
ramya-rao-a commentedon Jun 8, 2018
Thanks Ananto Ghosh (@anantoghosh)