Skip to content

Commit

Permalink
some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
PankajBhojwani committed Apr 30, 2024
1 parent 2b4aeb2 commit e62dfa2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/cascadia/TerminalSettingsModel/ActionMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,8 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
}

// Method Description:
// - Recursively populated keyBindingsMap with ours and our parents' key -> id pairs
// - Recursively populate keyBindingsMap with ours and our parents' key -> id pairs
// - This is a bottom-up approach, ensuring that the keybindings of the parents are overridden by the children
void ActionMap::_PopulateCumulativeKeyMap(std::unordered_map<Control::KeyChord, winrt::hstring, KeyChordHash, KeyChordEquality>& keyBindingsMap)
{
for (const auto& [keys, cmdID] : _KeyMap)
Expand All @@ -288,7 +289,8 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
}

// Method Description:
// - Recursively populated actionMap with ours and our parents' id -> command pairs
// - Recursively populate actionMap with ours and our parents' id -> command pairs
// - This is a bottom-up approach, ensuring that the actions of the parents are overridden by the children
void ActionMap::_PopulateCumulativeActionMap(std::unordered_map<hstring, Model::Command>& actionMap)
{
for (const auto& [cmdID, cmd] : _ActionMap)
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalSettingsModel/GlobalAppSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ void GlobalAppSettings::LayerJson(const Json::Value& json, const OriginTag origi

void GlobalAppSettings::LayerActionsFrom(const Json::Value& json, const OriginTag origin, const bool withKeybindings)
{
// this order change is intentional, we want to do the keybindings map _after_ so that we have already
// we want to do the keybindings map after the actions map so that we have already
// stored the action IDs in the action map
// also, we want the keybindings map to overwrite any leftover keybindings that might have existed in the first pass,
// in case the user did a partial update from legacy to modern
Expand Down

0 comments on commit e62dfa2

Please sign in to comment.