File tree Expand file tree Collapse file tree 2 files changed +31
-6
lines changed Expand file tree Collapse file tree 2 files changed +31
-6
lines changed Original file line number Diff line number Diff line change 629
629
" folder" ,
630
630
" separator" ,
631
631
" remainingProfiles" ,
632
- " matchProfiles"
632
+ " matchProfiles" ,
633
+ " action"
633
634
]
634
635
},
635
636
"NewTabMenuEntry" : {
781
782
}
782
783
]
783
784
},
785
+ "ActionEntry" : {
786
+ "description" : " An action in the new tab dropdown" ,
787
+ "allOf" : [
788
+ {
789
+ "$ref" : " #/$defs/NewTabMenuEntry"
790
+ },
791
+ {
792
+ "type" : " object" ,
793
+ "properties" : {
794
+ "type" : {
795
+ "type" : " string" ,
796
+ "const" : " action"
797
+ },
798
+ "profile" : {
799
+ "type" : " string" ,
800
+ "default" : " " ,
801
+ "description" : " The ID of the action to show in this entry"
802
+ }
803
+ }
804
+ }
805
+ ]
806
+ },
784
807
"SwitchToAdjacentTabArgs" : {
785
808
"oneOf" : [
786
809
{
2054
2077
},
2055
2078
{
2056
2079
"$ref" : " #/$defs/RemainingProfilesEntry"
2080
+ },
2081
+ {
2082
+ "$ref" : " #/$defs/ActionEntry"
2057
2083
}
2058
2084
]
2059
2085
}
Original file line number Diff line number Diff line change @@ -1008,13 +1008,12 @@ namespace winrt::TerminalApp::implementation
1008
1008
{
1009
1009
const auto actionEntry = entry.as <ActionEntry>();
1010
1010
const auto actionId = actionEntry.ActionId ();
1011
- if (_settings.ActionMap ().GetActionById (actionId) == nullptr )
1011
+ if (_settings.ActionMap ().GetActionById (actionId))
1012
1012
{
1013
- break ;
1013
+ auto actionItem = _CreateNewTabFlyoutAction (actionId);
1014
+ items.push_back (actionItem);
1014
1015
}
1015
1016
1016
- auto actionItem = _CreateNewTabFlyoutAction (actionId);
1017
- items.push_back (actionItem);
1018
1017
break ;
1019
1018
}
1020
1019
}
@@ -1121,7 +1120,7 @@ namespace winrt::TerminalApp::implementation
1121
1120
_SetAcceleratorForMenuItem (actionMenuItem, actionKeyChord);
1122
1121
}
1123
1122
1124
- auto actionName = action.Name ();
1123
+ const auto actionName = action.Name ();
1125
1124
actionMenuItem.Text (actionName);
1126
1125
1127
1126
// If there's an icon set for this action, set it as the icon for
You can’t perform that action at this time.
0 commit comments