Skip to content

wpf: allow OSC 52 to write the clipboard #18905

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 13, 2025
Merged

Conversation

DHowett
Copy link
Member

@DHowett DHowett commented May 13, 2025

We never hooked up this callback!

This allows a CLI application to emit text directly to the clipboard.

@@ -1043,7 +1048,7 @@
// - text - selected text in plain-text format
// - htmlData - selected text in HTML format
// - rtfData - selected text in RTF format
HRESULT HwndTerminal::_CopyTextToSystemClipboard(const std::wstring& text, const std::string& htmlData, const std::string& rtfData) const
HRESULT HwndTerminal::_CopyTextToSystemClipboard(wil::zwstring_view text, wil::zstring_view htmlData, wil::zstring_view rtfData) const

Check failure

Code scanning / check-spelling

Unrecognized Spelling

[zstring](#security-tab) is not a recognized word. \(unrecognized-spelling\)
@@ -1043,7 +1048,7 @@
// - text - selected text in plain-text format
// - htmlData - selected text in HTML format
// - rtfData - selected text in RTF format
HRESULT HwndTerminal::_CopyTextToSystemClipboard(const std::wstring& text, const std::string& htmlData, const std::string& rtfData) const
HRESULT HwndTerminal::_CopyTextToSystemClipboard(wil::zwstring_view text, wil::zstring_view htmlData, wil::zstring_view rtfData) const

Check failure

Code scanning / check-spelling

Unrecognized Spelling

[zstring](#security-tab) is not a recognized word. \(unrecognized-spelling\)
@@ -1099,7 +1104,7 @@
// Arguments:
// - stringToCopy - The string to copy
// - lpszFormat - the name of the format
HRESULT HwndTerminal::_CopyToSystemClipboard(const std::string& stringToCopy, LPCWSTR lpszFormat) const
HRESULT HwndTerminal::_CopyToSystemClipboard(wil::zstring_view stringToCopy, LPCWSTR lpszFormat) const

Check failure

Code scanning / check-spelling

Unrecognized Spelling

[zstring](#security-tab) is not a recognized word. \(unrecognized-spelling\)
@@ -145,8 +145,8 @@

void _UpdateFont(int newDpi);
void _WriteTextToConnection(const std::wstring_view text) noexcept;
HRESULT _CopyTextToSystemClipboard(const std::wstring& text, const std::string& htmlData, const std::string& rtfData) const;
HRESULT _CopyToSystemClipboard(const std::string& stringToCopy, LPCWSTR lpszFormat) const;
HRESULT _CopyTextToSystemClipboard(wil::zwstring_view text, wil::zstring_view htmlData, wil::zstring_view rtfData) const;

Check failure

Code scanning / check-spelling

Unrecognized Spelling

[zstring](#security-tab) is not a recognized word. \(unrecognized-spelling\)
@@ -145,8 +145,8 @@

void _UpdateFont(int newDpi);
void _WriteTextToConnection(const std::wstring_view text) noexcept;
HRESULT _CopyTextToSystemClipboard(const std::wstring& text, const std::string& htmlData, const std::string& rtfData) const;
HRESULT _CopyToSystemClipboard(const std::string& stringToCopy, LPCWSTR lpszFormat) const;
HRESULT _CopyTextToSystemClipboard(wil::zwstring_view text, wil::zstring_view htmlData, wil::zstring_view rtfData) const;

Check failure

Code scanning / check-spelling

Unrecognized Spelling

[zstring](#security-tab) is not a recognized word. \(unrecognized-spelling\)
@DHowett DHowett merged commit c64a9d2 into main May 13, 2025
19 checks passed
@DHowett DHowett deleted the dev/duhowett/wpf-clipboard branch May 13, 2025 23:18
@DHowett DHowett moved this from To Cherry Pick to Cherry Picked in 1.22 Servicing Pipeline May 13, 2025
@DHowett DHowett moved this from To Cherry Pick to Cherry Picked in 1.23 Servicing Pipeline May 13, 2025
DHowett added a commit that referenced this pull request May 13, 2025
We never hooked up this callback!

This allows a CLI application to emit text directly to the clipboard.

(cherry picked from commit c64a9d2)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgaWn6c
Service-Version: 1.23
DHowett added a commit that referenced this pull request May 13, 2025
We never hooked up this callback!

This allows a CLI application to emit text directly to the clipboard.

(cherry picked from commit c64a9d2)
Service-Card-Id: PVTI_lADOAF3p4s4AmhmQzgaWn6g
Service-Version: 1.22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Cherry Picked
Status: Cherry Picked
Development

Successfully merging this pull request may close these issues.

3 participants