Skip to content

fixes https://github.com/microsoft/vscode/issues/291188 - #314713

Merged
Megan Rogge (meganrogge) merged 1 commit into
microsoft:mainfrom
Larsjep:dev/lje/fix_291188
May 8, 2026
Merged

Megan Rogge (meganrogge) merged 1 commit into
microsoft:mainfrom
Larsjep:dev/lje/fix_291188

Conversation

@Larsjep

Copy link
Copy Markdown
Contributor

This PR fixes #291188.

How to test:

  • Enable editor.formatOnSave, and set task.saveBeforeRun to "always".
  • Change a file and run a task. Observe that the modified file is correctly formatted before being saved.

Copilot AI review requested due to automatic review settings May 6, 2026 12:22

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

This PR addresses #291188 by changing how VS Code saves dirty editors before running (and rerunning) tasks so that save participants (e.g., format-on-save and codeActionsOnSave) run as expected, matching the behavior users see when starting a debug session.

Changes:

  • Update task “save before run” to use an explicit save reason so formatting/code actions run during the pre-task save.
  • Update task rerun flow to use the same explicit save reason when saving dirty editors.

@meganrogge Megan Rogge (meganrogge) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

@meganrogge Megan Rogge (meganrogge) added this to the 1.120.0 milestone May 8, 2026
@meganrogge
Megan Rogge (meganrogge) enabled auto-merge (squash) May 8, 2026 16:34
@meganrogge
Megan Rogge (meganrogge) merged commit 25035fb into microsoft:main May 8, 2026
29 of 30 checks passed
Will Pfleger (wpfleger96) added a commit to wpfleger96/vscode that referenced this pull request May 8, 2026
…2-not-clearing-terminal-title

* upstream/main:
  chat: hide plugin actions for synced customization items (microsoft#315320)
  fixes microsoft#291188 (microsoft#314713)
  sessions: restore last active session on reload (microsoft#315312)
  Replace "Agents app" with "Agents window" in user-facing strings (microsoft#315302)
  chat: remove 'Bridged' badge from MCP servers in AI Customizations UI (microsoft#315319)
  Add proposal for custom editor diff/merge priority
  agentHost: revert undefined-field omission, update tests instead
  sessions: fix Customizations single-entry width overflow (microsoft#315125)
  agentHost: rewrite Resource attachments and omit undefined fields
  agentHost: support image and blob user-message attachments
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Jun 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Save on Build/Debug tasks doesn't format files

4 participants