fix remaining bugs

This commit is contained in:
Mike Griese
2022-04-29 06:22:48 -05:00
parent 1449088e80
commit d3b5533a1e
3 changed files with 9 additions and 7 deletions

View File

@@ -203,6 +203,10 @@ namespace winrt::TerminalApp::implementation
_PreviewSendInput(args.ActionAndArgs().Args().try_as<SendInputArgs>());
break;
}
default:
{
_EndPreview();
}
}
// GH#9818 Other ideas for actions that could be preview-able:

View File

@@ -245,10 +245,13 @@ namespace winrt::TerminalApp::implementation
_switchToTab(filteredCommand);
}
else if (_currentMode == CommandPaletteMode::ActionMode &&
filteredCommand != nullptr &&
currentlyVisible)
{
if (const auto actionPaletteItem{ filteredCommand.Item().try_as<winrt::TerminalApp::ActionPaletteItem>() })
if (filteredCommand == nullptr)
{
_PreviewActionHandlers(*this, nullptr);
}
else if (const auto actionPaletteItem{ filteredCommand.Item().try_as<winrt::TerminalApp::ActionPaletteItem>() })
{
_PreviewActionHandlers(*this, actionPaletteItem.Command());
}

View File

@@ -1278,11 +1278,6 @@ namespace winrt::TerminalApp::implementation
{
p.Visibility(Visibility::Collapsed);
}
if (const auto p = AutoCompleteMenu(); p.Visibility() == Visibility::Visible &&
cmd.ActionAndArgs().Action() != ShortcutAction::ToggleCommandPalette)
{
p.Visibility(Visibility::Collapsed);
}
// Let's assume the user has bound the dead key "^" to a sendInput command that sends "b".
// If the user presses the two keys "^a" it'll produce "bâ", despite us marking the key event as handled.