Skip to content
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

Clipboard: Remove NUL char addition for non text formats #2184

Merged
merged 2 commits into from
Mar 14, 2024

Conversation

CristiFati
Copy link
Contributor

Proposed fix for #2096.

While on the subject, since SetClipboardText is just a convenience wrapper (over SetClipboardData) for texts, wouldn't make sense to drop the 2nd argument (format) and rely solely on the data? The functionality that would no longer work is the one marked with @todo in the test (cause the other "cross" combination fails at conversion)? Or (since there might be other software already passing it) just leave it there but ignore it?

@mhammond
Copy link
Owner

wouldn't make sense to drop the 2nd argument (format) and rely solely on the data?

I guess that wouldn't work for CF_OEMTEXT though, right? But I guess it makes sense to have this param default to (say) None and use the data in that case to choose between the other 2 text formats?

Copy link
Owner

@mhammond mhammond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thanks!

@mhammond mhammond merged commit ad20c9b into mhammond:main Mar 14, 2024
16 checks passed
@CristiFati CristiFati deleted the cfati_dev04 branch March 28, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants