Skip to content

Commit 33a1a11

Browse files
zadjii-msftDHowett
authored andcommitted
Replace "bindings" with "actions" (#7332)
In #6532, we thought it would be a good idea to add "bindings" as an overload for "keybindings", as we were no longer going to use the keybindings array for just keybindings. We were going to add commands. So we started secretly treating `"bindings"` the same as `"keybindings"`. Then, in #7175, we discussed using "actions" as the key for the list of commands/keybindings/global actions, instead of using "bindings". We're going to be using this array as the global list of all actions, so it makes sense to just call it `"actions"`. This PR renames "bindings" to "actions". Fortunately, we never documented the "bindings" overload in the first place, so we can get away with this safely, and preferably before we ship "bindings" for too long. References #6899 (cherry picked from commit 2c4b868)
1 parent f1878f7 commit 33a1a11

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

src/cascadia/LocalTests_TerminalApp/SettingsTests.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2354,7 +2354,7 @@ namespace TerminalAppLocalTests
23542354
"commandline": "wsl.exe"
23552355
}
23562356
],
2357-
"bindings": [
2357+
"actions": [
23582358
{ "keys": "ctrl+a", "command": { "action": "splitPane", "split": "vertical" } },
23592359
{ "name": "ctrl+b", "command": { "action": "splitPane", "split": "vertical" } },
23602360
{ "keys": "ctrl+c", "name": "ctrl+c", "command": { "action": "splitPane", "split": "vertical" } },
@@ -2528,5 +2528,4 @@ namespace TerminalAppLocalTests
25282528
VERIFY_IS_TRUE(realArgs.TerminalArgs().Profile().empty());
25292529
}
25302530
}
2531-
25322531
}

src/cascadia/TerminalApp/GlobalAppSettings.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ using namespace ::Microsoft::Console;
1717
using namespace winrt::Microsoft::UI::Xaml::Controls;
1818

1919
static constexpr std::string_view LegacyKeybindingsKey{ "keybindings" };
20-
static constexpr std::string_view BindingsKey{ "bindings" };
20+
static constexpr std::string_view ActionsKey{ "actions" };
2121
static constexpr std::string_view DefaultProfileKey{ "defaultProfile" };
2222
static constexpr std::string_view AlwaysShowTabsKey{ "alwaysShowTabs" };
2323
static constexpr std::string_view InitialRowsKey{ "initialRows" };
@@ -233,7 +233,7 @@ void GlobalAppSettings::LayerJson(const Json::Value& json)
233233
}
234234
};
235235
parseBindings(LegacyKeybindingsKey);
236-
parseBindings(BindingsKey);
236+
parseBindings(ActionsKey);
237237
}
238238

239239
// Method Description:

src/cascadia/TerminalApp/defaults-universal.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"brightWhite": "#FFFFFF"
7373
}
7474
],
75-
"keybindings":
75+
"actions":
7676
[
7777
// Application-level Keys
7878
{ "command": "closeWindow", "keys": "alt+f4" },

src/cascadia/TerminalApp/defaults.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@
271271
"brightWhite": "#EEEEEC"
272272
}
273273
],
274-
"bindings":
274+
"actions":
275275
[
276276
// Application-level Keys
277277
{ "command": "closeWindow", "keys": "alt+f4" },

0 commit comments

Comments
 (0)