Repository: microsoft/terminal (language: cpp)

Issue:
Experimental "marks" settings are documented as global, but are per-profile
<!-- Briefly describe which document needs to be corrected and why. -->

#13414 added `experimental.autoMarkPrompts` and `experimental.showMarksOnScrollbar` to the `Globals` section of [_doc/cascadia/profiles.schema.json_](https://github.com/microsoft/terminal/blob/main/doc/cascadia/profiles.schema.json) (and they were also described as such in the [relevant release notes](https://github.com/microsoft/terminal/releases/tag/v1.15.1862.0)), but these settings are per-profile (as you'd expect such settings to be, and as documented in #11000).

Confirmed both because that's where they actually _work_ in the profile, and by [their presence in the `MTSM_PROFILE_SETTINGS` macro](https://github.com/microsoft/terminal/blob/main/src/cascadia/TerminalSettingsModel/MTSMSettings.h#L84-L85).

At least in VS Code's case, there's also an issue that even with the `$schema` pointing at [the correct JSON schema](https://raw.githubusercontent.com/microsoft/terminal/v1.15.2002.0/doc/cascadia/profiles.schema.json), validation does not like the new `scrollToMark` action, or in fact any of the new marks, but I suspect that is more of a VSCode JSON editor issue, since it's also rejecting `intenseTextStyle` as a profile setting. >_<


Discussion / hints:
Also, [the current JSON schema in main is probably invalid JSON](https://github.com/microsoft/terminal/pull/13469#discussion_r928138496), but that doesn't seem worth a separate bug report since fixing this will have to touch that file anyway.
Huh. Thanks for the heads up!

Fix patch:
diff --git a/doc/cascadia/profiles.schema.json b/doc/cascadia/profiles.schema.json
index d740324b310..a0e2b20507e 100644
--- a/doc/cascadia/profiles.schema.json
+++ b/doc/cascadia/profiles.schema.json
@@ -1733,16 +1733,6 @@
           "description": "When set to true, URLs will be detected by the Terminal. This will cause URLs to underline on hover and be clickable by pressing Ctrl.",
           "type": "boolean"
         },
-        "experimental.autoMarkPrompts": {
-          "default": false,
-          "description": "When set to true, prompts will automatically be marked.",
-          "type": "boolean"
-        },
-        "experimental.showMarksOnScrollbar": {
-          "default": false,
-          "description": "When set to true, marks added to the buffer via the addMark action will appear on the scrollbar.",
-          "type": "boolean"
-        },
         "disableAnimations": {
           "default": false,
           "description": "When set to `true`, visual animations will be disabled across the application.",
@@ -2171,6 +2161,11 @@
           "default": false,
           "description": "When true, this profile should always open in an elevated context. If the window isn't running as an Administrator, then a new elevated window will be created."
         },
+        "experimental.autoMarkPrompts": {
+          "default": false,
+          "description": "When set to true, prompts will automatically be marked.",
+          "type": "boolean"
+        },
         "experimental.connection.passthroughMode": {
           "description": "When set to true, directs the PTY for this connection to use pass-through mode instead of the original Conhost PTY simulation engine. This is an experimental feature, and its continued existence is not guaranteed.",
           "type": "boolean"
@@ -2179,6 +2174,11 @@
           "description": "When set to true, enable retro terminal effects. This is an experimental feature, and its continued existence is not guaranteed.",
           "type": "boolean"
         },
+        "experimental.showMarksOnScrollbar": {
+          "default": false,
+          "description": "When set to true, marks added to the buffer via the addMark action will appear on the scrollbar.",
+          "type": "boolean"
+        },
         "experimental.pixelShaderPath": {
           "description": "Use to set a path to a pixel shader to use with the Terminal. Overrides `experimental.retroTerminalEffect`. This is an experimental feature, and its continued existence is not guaranteed.",
           "type": "string"


Test patch: