Skip to content

Commit

Permalink
fix remaining bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
zadjii-msft committed Apr 29, 2022
1 parent 1449088 commit d3b5533
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 4 additions & 0 deletions src/cascadia/TerminalApp/ActionPreviewHandlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 5 additions & 2 deletions src/cascadia/TerminalApp/CommandPalette.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
5 changes: 0 additions & 5 deletions src/cascadia/TerminalApp/TerminalPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d3b5533

Please sign in to comment.