[PR #11343] [MERGED] Fix fragments that update other profiles #28504

Open
opened 2026-01-31 09:28:58 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/11343
Author: @lhecker
Created: 9/27/2021
Status: Merged
Merged: 9/27/2021
Merged by: @undefined

Base: mainHead: dev/lhecker/11331-fix-fragment-updates


📝 Commits (1)

  • f765e9c Fix fragments that update other profiles

📊 Changes

3 files changed (+34 additions, -33 deletions)

View changed files

📝 src/cascadia/TerminalSettingsModel/CascadiaSettings.cpp (+5 -3)
📝 src/cascadia/TerminalSettingsModel/CascadiaSettings.h (+1 -2)
📝 src/cascadia/TerminalSettingsModel/CascadiaSettingsSerialization.cpp (+28 -28)

📄 Description

SettingsLoader::_parse used to skip profiles which didn't have either a "guid"
or "name" field, due to #9962. This is however wrong for fragment loading, as
fragments can alternatively use an "updates" field instead of guid/name.

SettingsLoader::_parse was updated to allow profiles with this alternative
field during fragment loading.

PR Checklist

Validation Steps Performed

  • Wrote the following to
    %LOCALAPPDATA%\Microsoft\Windows Terminal\Fragments\test\test.json:
    {
      "profiles": [
        {
          "updates": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
          "background": "#FFD700"
        }
      ]
    }
    

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/11343 **Author:** [@lhecker](https://github.com/lhecker) **Created:** 9/27/2021 **Status:** ✅ Merged **Merged:** 9/27/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/lhecker/11331-fix-fragment-updates` --- ### 📝 Commits (1) - [`f765e9c`](https://github.com/microsoft/terminal/commit/f765e9cc01487c0c5875e047f5c57a79a09eee6b) Fix fragments that update other profiles ### 📊 Changes **3 files changed** (+34 additions, -33 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalSettingsModel/CascadiaSettings.cpp` (+5 -3) 📝 `src/cascadia/TerminalSettingsModel/CascadiaSettings.h` (+1 -2) 📝 `src/cascadia/TerminalSettingsModel/CascadiaSettingsSerialization.cpp` (+28 -28) </details> ### 📄 Description `SettingsLoader::_parse` used to skip profiles which didn't have either a "guid" or "name" field, due to #9962. This is however wrong for fragment loading, as fragments can alternatively use an "updates" field instead of guid/name. `SettingsLoader::_parse` was updated to allow profiles with this alternative field during fragment loading. ## PR Checklist * [x] Closes #11331 * [x] I work here * [x] Tests added/passed ## Validation Steps Performed * Wrote the following to `%LOCALAPPDATA%\Microsoft\Windows Terminal\Fragments\test\test.json`: ```json { "profiles": [ { "updates": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "background": "#FFD700" } ] } ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:28:58 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#28504