Closed prk3 closed 3 years ago
It should probably check if the editor is empty before inserting. I'll take a look.
OK, I've reproduced this - it seems to only happen if the new file hasn't been saved. It does already check that the file is empty, but it seems that until the file is saved, it appears to still be empty.
I'll carry on investigating...
I've found a hack which seems to fix it - selecting any text before inserting the snippet works. I'm just checking there are no side effects...
OK - I've uploaded a new version - let me know if it works OK.
Seems like the bug gone. You can see how the text is selected for a fraction of a second. Thanks a lot!
Hey. Big thanks for working on this addon. It's one of the first plugins I add to a fresh vscode setup.
I noticed a small bug. When you move a new file between folders, a snippet is inserted multiple times. Here is a screen capture.
vscode version: 1.49.2 auto-snippet version: 0.0.8 config: