From 598485c7393ea44ddf027eaca60aed0dc23fdc08 Mon Sep 17 00:00:00 2001 From: Don-Vito Date: Sun, 11 Oct 2020 00:09:49 +0300 Subject: [PATCH] 7395: skip snapshot key when clearing selection --- src/cascadia/TerminalControl/TermControl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cascadia/TerminalControl/TermControl.cpp b/src/cascadia/TerminalControl/TermControl.cpp index 299b6df5124..592cd733f7f 100644 --- a/src/cascadia/TerminalControl/TermControl.cpp +++ b/src/cascadia/TerminalControl/TermControl.cpp @@ -953,8 +953,9 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation // flow through to the terminal. // GH#6423 - don't dismiss selection if the key that was pressed was a // modifier key. We'll wait for a real keystroke to dismiss the + // GH #7395 - don't dismiss selection when taking PrintScreen // selection. - if (_terminal->IsSelectionActive() && !KeyEvent::IsModifierKey(vkey)) + if (_terminal->IsSelectionActive() && !KeyEvent::IsModifierKey(vkey) && vkey != VK_SNAPSHOT) { _terminal->ClearSelection(); _renderer->TriggerSelection();