align whitespace menu option with setting#306483
Merged
joshspicer merged 4 commits intomainfrom Mar 31, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Addresses the misleading View → Appearance → Render Whitespace menu state by replacing the single toggle with a dedicated submenu that reflects the actual editor.renderWhitespace mode.
Changes:
- Introduces a new
EditorRenderWhitespaceSubmenumenu id. - Reworks the Appearance menu entry into a “Render Whitespace” submenu with explicit modes (None/Boundary/Selection/Trailing/All).
- Keeps the existing “Toggle Render Whitespace” command (F1) but removes it from the menubar Appearance menu.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.ts | Adds mode-specific commands and registers a new menubar submenu to select the render whitespace mode. |
| src/vs/platform/actions/common/actions.ts | Adds a new MenuId for the render-whitespace submenu. |
src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.ts
Outdated
Show resolved
Hide resolved
…ands Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/d7e269a5-e4e5-4d4c-967d-2b2c9f09b835 Co-authored-by: joshspicer <23246594+joshspicer@users.noreply.github.com>
…e MenuRegistry calls Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/68d6d9ff-b7a9-41b1-89f7-3c561b677802 Co-authored-by: joshspicer <23246594+joshspicer@users.noreply.github.com>
roblourens
approved these changes
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses the misleading View → Appearance → Render Whitespace menu state by replacing the single toggle with a dedicated submenu that reflects the actual
editor.renderWhitespacemode.Changes Made
EditorRenderWhitespaceSubmenumenu id.title(e.g. "Set Render Whitespace to None") so it is unambiguous when surfaced in keyboard shortcuts settings, and ashortTitle(e.g. "None") for concise display.menuproperty) and toggle state (toggled) are declared directly in eachAction2descriptor, eliminating duplicateMenuRegistry.appendMenuItemcalls. Only the submenu header registration remains as a separateMenuRegistrycall.