-
Notifications
You must be signed in to change notification settings - Fork 54
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
editing html tags automatically adds attributes to the closing html tag (which should never happen) #114
Comments
I'm also seeing this in the updated Maven POM Editor if I just wait for a few moments with the cursor at the end of the start tag's name. |
It is a problem with linked editing range. For XML (LemMinx it should be fixed with eclipse/lemminx#1188) Once WWD will use last version of lemMinx, this error should disapear. For HTML, it requires that vscode html language server written in TypeScript do the same fix than XML. |
@r6squeegee Could you please try updating LSP4E from a latest snapshot - http://download.eclipse.org/lsp4e/snapshots/ - this should allow the linked editing to happen only for the element names, not the following attributes. |
Could not reproduce with latest snapshots of LSP4E. Please reopen with details to reproduce if issue persists on your end. |
Fix is a427c47 |
Are you sure that it is fixed for HTML? If yes it means HTML LS generate the same linked editing range than XML (which is fixed). |
it works for me |
I think there might be a missed case in this fix. It still happens on paste, i.e. and have in your clipboard, move the cursor back to the div tag and press paste, causes |
Re-opened due to the copy-paste case - #114 (comment) |
The upstream issue is opened eclipse-platform/eclipse.platform.text#33 in order to track the copy-paste issue. The current API doesn't allow for adopters to exit the Linked Editing operation in case of pasting text that contains "stop" characters. |
this has been happening to me for a while now, but specifically right now I'm on eclipse build 20220310-1457
with "Wild Web Developer HTML, CSS, JSON, Yaml, JavaScript, TypeScript, Node tools 0.10.13.202204031849"
I'm on a blank line in an html file, and i type the following :
<div></div>
What I really want is
<div class="foo"></div>
though so I use the arrow keys to move back behind to the letter "v" and I press "space" and start typing the word "class".
The editor starts adding that to the closing tag, i.e. I end up with
<div class="foo"></div class="foo">
then I hit ctrl-z to undo and the editor completely screws up. i.e. it seems to randomly delete some characters and makes a complete mess of the surrounding lines of code. Basically I have to close the file with out saving and re-open it to get back to a sane state.
The text was updated successfully, but these errors were encountered: