Closed lukaszpolowczyk closed 3 years ago
Looks like you have the setting template-string-converter.autoRemoveTemplateString
which seems to cause this issue. I'd reccomend turning that off (I personally don't use it).
@meganrogge Yes, I used this option. Either remove this option or it needs to be repaired.
You closed the topic right away, so you probably don't plan on fixing it?
I was not/am not a fan of that setting for the reason you pointed out and others. I closed this bc I don't think the extension should try to track whether or not the $ was removed. You'll see in the original feature request, I pointed out my concerns about doing that. I think the setting should be off for most users.
"I don't think the extension should try to track whether or not the $ was removed."
That this option should be removed - I understand that. You don't want to support her, that's it.
But you can see what happens when I modify the code normally - the edit change history is deleted! In Svelte.js, I changed the string template to a regular mustache - that's why I removed the dollar sign. Later I checked something with the previous version of the code. When I wanted to go back, the story got stuck on erasing the dollar sign.
This is a really sneaky and malicious function when it goes wrong.
I agree, which is why I have that setting off by default.
I will probably add a warning about this in the setting description. Will that be sufficient for you?
@meganrogge Well, if there's nothing else you can do. Better to remove it completely, because it is not functional and is dangerous.
Yeah I think you're right. I'll consider what to do, but might remove it entirely.
done - it's removed as of the next version. probably the right call, thanks for bringing this to my attention
The issue should be fixed now
Bug with undoing changes - deletes the history of changes!
Steps to reproduce:
$ {dd}
in it$
Ctrl + Z
Steps on the gif:
This is very painful because, for example, I check the previous version of something (undo), then I want to go back to the newest (redo) and they can't, my work has been wasted!
For now, I am disabling the extension because it is dangerous.
Solution: An extension shouldn't fire its function when you use undo/redo, but just like manually typing or pasting the code.
$
itself also blocked the history (undo).