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

Return nothing if there is nothing to search for #2160

Merged
merged 2 commits into from Jan 23, 2016

Conversation

tiennou
Copy link
Member

@tiennou tiennou commented Nov 17, 2015

Fixes #2158.

@pjrobertson
Copy link
Member

@pjrobertson pjrobertson commented Nov 17, 2015

Nice, I see no issue with it. What happens if the search string is @""?

@pjrobertson
Copy link
Member

@pjrobertson pjrobertson commented Nov 17, 2015

A quick question on this line, whilst we're in the file: why use isEqual:nil?

Also, do you think it's worth updating the whole file to spaces...? 😨

@tiennou
Copy link
Member Author

@tiennou tiennou commented Nov 18, 2015

Haven't actually tried. I'd suppose it would not crash (the fixed crash happens because it does CFStringy stuff on nil), but it might not work correctly (returns immediately, maybe ?).

I think I'll ponder some more on that code. And write some tests ;-).

Spaces ? Or Tabs ? 😆

@pjrobertson
Copy link
Member

@pjrobertson pjrobertson commented Nov 18, 2015

Tabs :D
(as much as I want spaces as well!)

On 18 November 2015 at 17:03, Etienne Samson notifications@github.com
wrote:

Haven't actually tried. I'd suppose it would not crash (the fixed crash
happens because it does CFStringy stuff on nil), but it might not work
correctly (returns immediately, maybe ?).

I think I'll ponder some more on that code. And write some tests ;-).

Spaces ? Or Tabs ? [image: 😆]


Reply to this email directly or view it on GitHub
#2160 (comment)
.

@skurfer
Copy link
Member

@skurfer skurfer commented Nov 18, 2015

why use isEqual:nil?

Even I can’t answer that. Not sure what I was thinking. Maybe I copied and pasted it from somewhere and missed that test.

@skurfer
Copy link
Member

@skurfer skurfer commented Nov 23, 2015

Added a commit to change that test @pjrobertson. If it looks good, merge. As for tabs, I don’t want to destroy all the history.

skurfer added a commit that referenced this issue Jan 23, 2016
Return nothing if there is nothing to search for
@skurfer skurfer merged commit 8d6c1db into master Jan 23, 2016
2 checks passed
@skurfer skurfer deleted the t/fix-nil-spotlight-queries branch Jan 23, 2016
skurfer added a commit that referenced this issue Jan 23, 2016
@pjrobertson
Copy link
Member

@pjrobertson pjrobertson commented Jan 23, 2016

Yup fine. Sorry - 3 months later :(

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.

None yet

3 participants