mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-10 00:48:23 -06:00
Fix Ctrl+Insert does not copy the selected text from Command Palette (#18483)
Fixes an issue where pressing `CTRL` + `Insert` does not copy text selected in the Command Palette. Instead, it closes it, and any text selected in the pane is copied to the clipboard. Since `Insert` is a virtual key, I address the issue by adding a conditional check for `CTRL` with either `Insert` or `C` (previously, it only checked for `CTRL` with `C`) for the copy action in the Command Palette. ## Validation Steps Performed I followed the reproduction steps and verified that the actual behaviour matched the expected behaviour. All existing tests passed, but no new test was added. Closes #9520
This commit is contained in:
parent
aafbd17f3d
commit
2e92a15464
@ -359,7 +359,7 @@ namespace winrt::TerminalApp::implementation
|
||||
_switchToMode(CommandPaletteMode::CommandlineMode);
|
||||
e.Handled(true);
|
||||
}
|
||||
else if (key == VirtualKey::C && ctrlDown)
|
||||
else if ((key == VirtualKey::C || key == VirtualKey::Insert) && ctrlDown)
|
||||
{
|
||||
_searchBox().CopySelectionToClipboard();
|
||||
e.Handled(true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user