Skip to content

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

Merged
mhammond merged 2 commits intomhammond:mainfrom
CristiFati:cfati_dev04
Mar 14, 2024
Merged

Clipboard: Remove NUL char addition for non text formats#2184
mhammond merged 2 commits intomhammond:mainfrom
CristiFati:cfati_dev04

Conversation

@CristiFati
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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!

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