Skip to content

Fix :mark on playlist view so filter is used - #904

Merged
flyingmutant merged 1 commit into
cmus:masterfrom
torbiak:plmark
Sep 29, 2024
Merged

flyingmutant merged 1 commit into
cmus:masterfrom
torbiak:plmark

Conversation

@torbiak

@torbiak torbiak commented May 9, 2019 •

Copy link
Copy Markdown
Contributor

The manpage says filter expressions can be used in views 2-4, and I don't see the utility in :mark inverting the selection in the playlist view.

@nefthy

nefthy commented Jan 13, 2021

Copy link
Copy Markdown
Collaborator

Closing due to inactivity. Please feel free to reopen or create a new one.

@hunkyburrito

Copy link
Copy Markdown
Contributor

Would love to see this re-opened and merged. Still works completely fine when I rebased and tested it locally.

@torbiak

torbiak commented Sep 26, 2024

Copy link
Copy Markdown
Contributor Author

Reading my description of the problem again, I think I may have been too terse.

In the manpage it says that :mark can be given a filter expression on views 2-4. But currently in view 3 (ie. playlist), when you run :mark it instead inverts the selection and ignores any given filter expression. I don't get why that'd be useful, since there's already the :invert command. My change just calls the function to select using the given filter expression (editable_mark()), making :mark behaviour in the Playlist view consistent with the Sorted Library and Play Queue views.

@pgaskin

pgaskin commented Sep 26, 2024

Copy link
Copy Markdown
Member

Makes sense at a glance, original implementation looks like a copy-paste error. I'll test it properly later.

@pgaskin pgaskin reopened this Sep 26, 2024

@pgaskin pgaskin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Code looks good, matches the other views, works as expected.

This PR actually fixes a regression introduced in 8e03cf6, which refactored the pl commands to use wrappers in pl.c, and made an error while copy-pasting the mark implementation.

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.

5 participants