Skip to content

Brackets Snippet deleting chars #235515

@RedCMD

Description

@RedCMD

Brackets Snippet in replace mode deletes char when prefix already exists
Image

Steps to Reproduce:

  1. Set editor.suggest.insertMode to replace
  2. Create new global snippet workbench.action.openSnippets
{
	"Brackets": {
		"scope": "plaintext",
		"prefix": "()",
		"body": "()",
		"description": "Set `editor.suggest.insertMode` to `replace`\nWhen `()` already exists, the snippet deletes the next following char\n "
	}
}
  1. Create new plaintext file with example text
()!!
()  
()aa
  1. Place cursor in-between brackets
  2. Press ctrl+space and select Brackets Snippet

Expected:
nothing
(Cursor moves 1 to the right)
Image

Actual:
1 character is deleted after the () 🐛
doesn't matter if the char is a wordPattern or wordSeparator or whitespace
Image

Notice that using other characters other than brackets () does not result in chars being deleted

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.95.3
  • OS Version: Windows 11

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugsnippets

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions