Skip to content

Commit

Permalink
Hotfix block selection linebreaks in conhost (#15423)
Browse files Browse the repository at this point in the history
This regressed in a1f42e8 which only made changes to Windows Terminal
but forgot to make equivalent ones in OpenConsole/conhost.
Without this fix, line breaks in block selections are missing if the
line doesn't force a wrap via an explicit newline.

Closes #15153

## Validation Steps Performed
* Run Far or print long lines of text
* Trigger block selection via Ctrl+M or Edit > Mark
* Clipboard contains N-1 newlines lines for N selected rows ✅
  • Loading branch information
lhecker authored May 26, 2023
1 parent 8611d90 commit cd6b083
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/interactivity/win32/Clipboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ void Clipboard::StoreSelectionToClipboard(const bool copyFormatting)
const auto text = buffer.GetText(includeCRLF,
trimTrailingWhitespace,
selectionRects,
GetAttributeColors);
GetAttributeColors,
selection.IsKeyboardMarkSelection());

CopyTextToSystemClipboard(text, copyFormatting);
}
Expand Down

0 comments on commit cd6b083

Please sign in to comment.