[linked rename] Linked Editing does't work well
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.87.2
- OS Version: macOS 14.3.1 (23D60)
Steps to Reproduce:
- set up the linked editing option as true
- crate an HTML tag with one or two attributes, like
<div class="main"></div> - modify the name of the tag on the opening tag, you would find out that the closing tag is automatically deleted while not added automatically.
/needsMoreInfo
Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.
Happy Coding!
/needsMoreInfo
Sorry, I just misclicked the post button.
/causedByExtension
/causedByExtension
Sorry for my misunderstood, It's indeed an issue. If there are some attributes in the opening tag, you can't delete the entire name, then change it to another one, like this.
If you delete part of the name, it wokrs.
If there is no attributes in the opening tags, it works perfectly whether deleting the entire name or part of the name.
@aeschli is this your area? If not, please redirect. It also needs two labels removing.
+1 Experiencing this (annoying) issue as well.
Sometimes if I type too fast, the tag on the other side couldn't catch up, and stops updating half-way.
Facing this exact same issue as well
Still happening on VSCode 1.92.2.
same here
Sometimes if I type too fast, the tag on the other side couldn't catch up, and stops updating half-way.
The same problem. It appears that at this point the only way to ensure predictable behavior is to disable this setting.
This problem has nothing to do with extensions. I just did a bisect and even without any extensions enabled this bug still occures.
https://github.com/user-attachments/assets/24507368-a003-4343-810b-a12652278f3c
21-10-2024 issue persists. I have found a workaround, you have to select the tag name and then instead of clearing the name, start writing the new one.
Duplicate of #185279
just experienced this now and found this issue. very annoying
vscode team tried to replace a third party plugin and this is the result. LOL.
I think I found a solution for this problem.
Because of the very unstable reproducability of this issue, it seems to be some kind of race condition that is causing this. After removing this line https://github.com/microsoft/vscode/blob/main/src/vs/editor/contrib/linkedEditing/browser/linkedEditing.ts#L304 it worked great and I was not able to desync the tags anymore, no matter how fast or slow I type.
I will create a PR for this. Maybe someone else can do some further testing.
As a small bonus, the highlighted sync range will stop flickering when typing.
I think I found a solution for this problem.
Because of the very unstable reproducability of this issue, it seems to be some kind of race condition that is causing this. After removing this line https://github.com/microsoft/vscode/blob/main/src/vs/editor/contrib/linkedEditing/browser/linkedEditing.ts#L304 it worked great and I was not able to desync the tags anymore, no matter how fast or slow I type.
I will create a PR for this. Maybe someone else can do some further testing.
As a small bonus, the highlighted sync range will stop flickering when typing.
This looks like a good fix, otherwise this feature is unusable. The tags "desync" from typing too fast, and also when the tag name is removed entirely.
Fixed by #242993
I still see the exact same behaviour as https://github.com/microsoft/vscode/issues/208276#issuecomment-2011273196.
If someone wants to look into a PR...