Skip to content

fix: deleting whitespace#324211

Merged
aiday-mar merged 2 commits into
mainfrom
blank-macaw
Jul 6, 2026
Merged

fix: deleting whitespace#324211
aiday-mar merged 2 commits into
mainfrom
blank-macaw

Conversation

@aiday-mar

@aiday-mar aiday-mar commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

fixes #245055
fixes #259145

Copilot AI review requested due to automatic review settings July 3, 2026 12:36
@aiday-mar aiday-mar self-assigned this Jul 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a regression in the editor’s word-deletion logic so Ctrl+Del (deleteWordRight) can remove whitespace runs without accidentally deleting comment markers (e.g. //) in mixed multi-cursor alignment scenarios, as described in #245055.

Changes:

  • Adjust whitespace-heuristics boundary in WordOperations._deleteWordRightWhitespace to trigger even when there is only a single whitespace character before the next non-whitespace character.

Comment on lines 630 to 634
const firstNonWhitespace = this._findFirstNonWhitespaceChar(lineContent, startIndex);
if (startIndex + 1 < firstNonWhitespace) {
if (startIndex < firstNonWhitespace) {
// bingo
return new Range(position.lineNumber, position.column, position.lineNumber, firstNonWhitespace + 1);
}
chrmarti
chrmarti previously approved these changes Jul 3, 2026
@aiday-mar
aiday-mar requested review from chrmarti and removed request for chrmarti July 3, 2026 13:27
@aiday-mar
aiday-mar enabled auto-merge (squash) July 6, 2026 12:04
@aiday-mar
aiday-mar merged commit 2fe88e4 into main Jul 6, 2026
29 checks passed
@aiday-mar
aiday-mar deleted the blank-macaw branch July 6, 2026 14:23
@vs-code-engineering vs-code-engineering Bot added this to the 1.129.0 milestone Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deleteWordRight handles 1 whitespace differently from 2 whitespace "CTRL + DEL" keyboard shortcut not working as expected and deleting comments

4 participants