Skip to content

"CTRL + DEL" keyboard shortcut not working as expected and deleting comments #245055

Open
@jdrjuan

Description

@jdrjuan

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

  • VS Code Version: 1.98.2
  • OS Version: Windows 11 Pro x64

Steps to Reproduce:

  1. Add inline comments at the end of some lines in a JS file. Make sure the comments are not all at the same column. For example:
const name = '65" TV';   // nombre
const brand = 'Sony';     // marca
const warranty = 12;     // garantía
  1. Add multiple cursors, one in each line at the same column number, before the "//" comments and make sure one of them is one space before the "//" and another cursor is at least two spaces appart. For example, in here the pipe character represents the cursors position, and the intention is to align all the comments to get them be in the same column, one below each other:
const name = '65" TV';  | // nombre
const brand = 'Sony';   |  // marca
const warranty = 12;    | // garantía
  1. Press CTRL + DEL to delete the empty spaces before the comment (the name of this command is deleteWordRight).
    Expected result:
const name = '65" TV';  // nombre
const brand = 'Sony';   // marca
const warranty = 12;    // garantía

What we get instead:

const name = '65" TV';   nombre
const brand = 'Sony';   // marca
const warranty = 12;     garantía

This worked fine some versions ago. Sorry for not reporting on time.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugeditor-coreEditor basic functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions