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

Auto self-closing feature deletes content #440

Closed
datho7561 opened this issue Mar 19, 2021 · 2 comments · Fixed by eclipse-lemminx/lemminx#1009, #441 or enxio/lsp4xml#130
Closed

Auto self-closing feature deletes content #440

datho7561 opened this issue Mar 19, 2021 · 2 comments · Fixed by eclipse-lemminx/lemminx#1009, #441 or enxio/lsp4xml#130
Assignees
Labels
bug Something isn't working
Milestone

Comments

@datho7561
Copy link
Contributor

Type / where the pipe is:

<foo |

  <baloney></baloney>

</foo>

Everything else is deleted:

SelfCloseDeletesContent

Expected result:

<foo />

  <baloney></baloney>

</foo>
@datho7561 datho7561 added the bug Something isn't working label Mar 19, 2021
@sergey-s-betke
Copy link

But I like this behavior...

@fbricon
Copy link
Collaborator

fbricon commented Mar 23, 2021

@datho7561 so make it a preference

@datho7561 datho7561 self-assigned this Mar 24, 2021
datho7561 added a commit to datho7561/lemminx that referenced this issue Mar 24, 2021
Adds the setting `xml.completion.autoCloseRemovesContent`,
which defaults to `true` (to preserve existing behaviour).
When the setting is set to `false`,
and the auto close tags funcitonality is enabled,
`<bbb />` and `</aaa>` won't be deleted
when an `/` is inserted at the pipe:

```xml
<aaa |
  <bbb />
</aaa>
```

Closes redhat-developer/vscode-xml#440

Signed-off-by: David Thompson <[email protected]>
datho7561 added a commit to datho7561/vscode-xml that referenced this issue Mar 24, 2021
@datho7561 datho7561 added this to the 0.17.0 milestone Apr 13, 2021
datho7561 added a commit to datho7561/vscode-xml that referenced this issue Apr 14, 2021
datho7561 added a commit to datho7561/vscode-xml that referenced this issue Apr 30, 2021
datho7561 added a commit to eclipse-lemminx/lemminx that referenced this issue Apr 30, 2021
Adds the setting `xml.completion.autoCloseRemovesContent`,
which defaults to `true` (to preserve existing behaviour).
When the setting is set to `false`,
and the auto close tags funcitonality is enabled,
`<bbb />` and `</aaa>` won't be deleted
when an `/` is inserted at the pipe:

```xml
<aaa |
  <bbb />
</aaa>
```

Closes redhat-developer/vscode-xml#440

Signed-off-by: David Thompson <[email protected]>
datho7561 added a commit to datho7561/vscode-xml that referenced this issue May 3, 2021
datho7561 added a commit that referenced this issue May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment