Compare commits

...

1 Commits

Author SHA1 Message Date
Pankaj Bhojwani
24ad5b391d don't handle these if the palette is open 2025-01-08 13:40:16 -08:00

View File

@@ -452,8 +452,15 @@ namespace winrt::TerminalApp::implementation
void TerminalPage::_HandlePasteText(const IInspectable& /*sender*/,
const ActionEventArgs& args)
{
_PasteText();
args.Handled(true);
if (ExtensionPresenter().Visibility() == Visibility::Visible)
{
args.Handled(false);
}
else
{
_PasteText();
args.Handled(true);
}
}
void TerminalPage::_HandleNewTab(const IInspectable& /*sender*/,
@@ -547,7 +554,11 @@ namespace winrt::TerminalApp::implementation
void TerminalPage::_HandleCopyText(const IInspectable& /*sender*/,
const ActionEventArgs& args)
{
if (const auto& realArgs = args.ActionArgs().try_as<CopyTextArgs>())
if (ExtensionPresenter().Visibility() == Visibility::Visible)
{
args.Handled(false);
}
else if (const auto& realArgs = args.ActionArgs().try_as<CopyTextArgs>())
{
const auto handled = _CopyText(realArgs.DismissSelection(), realArgs.SingleLine(), realArgs.WithControlSequences(), realArgs.CopyFormatting());
args.Handled(handled);