processing-vscode icon indicating copy to clipboard operation
processing-vscode copied to clipboard

[BUG] PGraphics.resetMatrix() replaced with translate(x, y, z) by Intellisense

Open ndesprez opened this issue 3 years ago • 2 comments

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:

  1. Type "resetM"
  2. Press TAB

Expected behavior resetM should be replaced by resetMatrix().

VSCode

  • OS: Windows 10 21H1
  • Version 1.60.1

ndesprez avatar Sep 16 '21 00:09 ndesprez

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

AvinZarlez avatar Oct 05 '21 20:10 AvinZarlez

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.

ndesprez avatar Oct 13 '21 06:10 ndesprez