processing-vscode
processing-vscode copied to clipboard
[BUG] PGraphics.resetMatrix() replaced with translate(x, y, z) by Intellisense
Bug description When pressing TAB after typing resetM, "resetMatrix()" appears in the predictive keyword list but when TAB is pressed, the text is replaced by "translate(x, y, z)".
To Reproduce Steps to reproduce the behavior:
- Type "resetM"
- Press TAB
Expected behavior resetM should be replaced by resetMatrix().
VSCode
- OS: Windows 10 21H1
- Version 1.60.1
This extension does not provide intellisense. It does however provide snippets.
The relavent snippet:
"resetMatrix": {
"prefix": "resetMatrix",
"body": "translate(${1:x}, ${2:y}, ${3:z});",
"description": "resetMatrix",
"scope": "source.pde"
},
I got those snippets definitions a long time ago from the sublime package https://github.com/b-g/processing-sublime/blob/a1bc61861024060572ea0be9e79a4f6ac471de20/Snippets/resetMatrix.sublime-snippet
It's been forever since I used processing so not sure why the commend is that way in the sublime snippet (and thus here)
If it is supposed to be resetMatrix, it would be as simple as changing to:
"resetMatrix": {
"prefix": "resetMatrix",
"body": "resetMatrix()",
"description": "resetMatrix",
"scope": "source.pde"
},
Can you think of a reason why it would be the other way? Otherwise, I can fix this when I get around to making the next version release
Hi Tobias. Thanks for your reply. There's no reason why resetMatrix() should be replaced with a translate(). Your proposed correction seems good to me.