Repository navigation
Search should only try filename when there are no tags - #1263
Conversation
6448a53 to
2c9bc8e
Compare
pgaskin
left a comment
There was a problem hiding this comment.
Tested. Works as expected.
https://copr.fedorainfracloud.org/coprs/pgaskin/cmus-testing/build/6153648/
https://github.com/pgaskin/cmus/commits/83309568a563a3e8f789c9bc3cef2b43b3a80101
https://nightly.link/pgaskin/rpms/actions/runs/5495006170
seems like this was probably always the intended behavior
Personally, I think this makes sense. @flyingmutant, thoughts?
2c9bc8e to
fc2938a
Compare
| } | ||
|
|
||
| if (flags_set(ti, exclude_flags) && match_word(ti, word, exclude_flags)) | ||
| if (match_word(ti, word, exclude_flags)) |
There was a problem hiding this comment.
Why don't we call flags_set here?
There was a problem hiding this comment.
It's just not needed because match_word() does the same checks anyway. This line isn't fixing anything, I just thought it was clearer to understand.
There was a problem hiding this comment.
I think the same goes for call to flags_set above: they should either both be present, or both be absent for consistency. Probably flags_set was used as an optimization, to avoid any string comparisons, but I am not sure.
There was a problem hiding this comment.
The first one is needed though, to distinguish "no applicable tags -- fallback to filename search" from "no match -- don't fall back to filename".
Although this might be up for debate, but to me it seems like this was probably always the intended behavior.
Fixes #1262.