Skip to content

Conversation

jeremypw
Copy link
Collaborator

@jeremypw jeremypw commented Apr 1, 2025

Fixes #865

@@ -129,15 +129,14 @@ namespace Terminal.Utils {
*
* @return true if safe, false if unsafe.
*/
public bool is_safe_paste (string text, out string msg) {
public bool is_safe_paste (string text, out string[]? msg_array) {
Copy link
Member

Choose a reason for hiding this comment

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

Does this need to be nullable? I don't think this ever goes to a null check. Would returning an empty array be fine?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just avoids unnecessarily initializing an array which is not used but an empty array could be used if you prefer.

@danirabbit danirabbit merged commit a021999 into master Apr 1, 2025
4 checks passed
@danirabbit danirabbit deleted the jeremypw/show-all-unsafe branch April 1, 2025 23:05
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.

Show all detected unsafe paste warnings
2 participants