Repository navigation
Conversation
I generally agree with this too, except for when cmus is automated through cmus-remote. It might be worth adding a configuration option to keep the marked playlist in sync with the selected one. |
pgaskin
left a comment
There was a problem hiding this comment.
I think this should be conditional on a flag for the clear command to avoid breaking expectations for automation and to keep it consistent with the other commands. I'm not fully decided though, so I'm open to arguments in the other direction.
Yeah, that makes sense to me. I can look into doing this if it’s desired.
Is this in reference to the current changes or the configuration option proposal? If it’s the former, what are expectations for automation that these changes break? If it is the latter, wouldn’t the config option not affect cmus-remote? (I’m not too familiar with how cmus-remote works related to the GUI). |
pgaskin
left a comment
There was a problem hiding this comment.
Let's:
- Make
:clear -pclear the marked playlist unconditionally (so-cworks properly and matchesadd -p). Sinceflag_to_viewcollapses explicit flags and current view into the same value,view_clearwill need to know which case it is in. - Make
:clearin the playlist view clear the visible (selected) playlist regardless of pane (for #1423, and so it matcheswin-remove/win-update/pl-rename/pl-export).
| if (pl_cursor_in_track_window) | ||
| pl_win_next(); |
There was a problem hiding this comment.
Drop this. It's unreachable, and it would be wrong even if it was since pl_win_next only makes sense when the visible playlist was the one emptied.
Nothing breaks that wasn't already broken, to be precise, but I'll add the config option I mentioned as a sepearate PR. |
Fixes #1423. This PR allows users to clear the marked playlist when focused in the playlist list (left view).
I opted to clear the marked playlist rather than the visible playlist as this has the same functionality as the
addcommand. However, when selected the playlist that is visible will still be cleared. This may be confusing to users though, so I'm up for changing this to always clear the visible playlist (frankly, I think add working on marked playlists instead of visible playlists is confusing).Implementation notes
Although
pl_cursor_in_track_windowis currently always false whenpl_clear_marked_plis called, I still kept the condition in there in case it will be used for other situations later and to keep congruence withpl_clear_visible_pl. I can remove this condition if it's deemed unnecessary and just note thatpl_cursor_in_track_windowis assumed to be false in a comment.