-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removed shortcuts for starting new sessions is not reflected in new-session dropdown #13943
Comments
Thanks for the report! @carlos-zamora, this is probably a layering/masking issue. The shortcuts exist on the lower layer (defaults.json) but have been unbound on the upper layer (settings.json). |
Shockingly, this isn't a test for this case. void KeyBindingsTests::TestUnbindReverseLookup()
{
Log::Comment(L"TODO!");
// Wrap the first one in `R"!(...)!"` because it has `()` internally.
const std::string bindings0String{ R"!([ { "command": { "action": "newTab", "index": 0 }, "keys":"ctrl+a" } ])!" };
const std::string bindings1String{ R"([ { "keys": "ctrl+a", "command": null } ])" };
const auto bindings0Json = VerifyParseSucceeded(bindings0String);
const auto bindings1Json = VerifyParseSucceeded(bindings1String);
auto actionMap = winrt::make_self<implementation::ActionMap>();
VERIFY_ARE_EQUAL(0u, actionMap->_KeyMap.size());
actionMap->LayerJson(bindings0Json);
VERIFY_ARE_EQUAL(1u, actionMap->_KeyMap.size());
NewTerminalArgs newTerminalArgs{ 0 };
NewTabArgs newTabArgs{ newTerminalArgs };
{
auto keyChord{ actionMap->GetKeyBindingForAction(ShortcutAction::NewTab, newTabArgs) };
VERIFY_IS_NOT_NULL(keyChord);
}
actionMap->LayerJson(bindings1Json);
{
auto keyChord{ actionMap->GetKeyBindingForAction(ShortcutAction::NewTab, newTabArgs) };
VERIFY_IS_NULL(keyChord);
}
} This actually does pass today on main, so there's gotta be some parenting trickiness that causes this to fail |
This is a test however: |
ignore me, just adding some keywords: new tab key keys shortcut shortcuts menu bindings |
Windows Terminal version
1.14.2281.0
Windows build number
10.0.19044.0
Other Software
No response
Steps to reproduce
ctrl+shift+4
and make sure customizations are applied.Expected Behavior
I would expect to not see
ctrl+shift+4
to be advertised as bound.Actual Behavior
You will see
ctrl+shift+4
still advertised as bound.Keybindings were removed from the right-hand side and are still visible in the drop-down. The keybindings don't work, as expected, but they are still being advertised.
The text was updated successfully, but these errors were encountered: