mierak / rmpc

A configurable, terminal based Media Player Client with album art support via various terminal image protocols
https://mierak.github.io/rmpc/
BSD 3-Clause "New" or "Revised" License
138 stars 8 forks source link

[FR] Navlist enhancements #96

Closed soifou closed 1 month ago

soifou commented 1 month ago

When you are on the last item on any list, pressing Down go to the first item and conversely, pressing Up on the first item go to last item.

I think allowing to 'cycle' should be an opt-in behaviour. By default, as in ncmpcpp, a sane way would be to do... nothing. If I need to go to first/last, Top/Bottom actions can already do that.

In the same registry, a "nice to have" would be to implement a scrolloff option like in vim (minimal number of screen lines to keep above and below the current selected item) so we could better predict what will go next/prev.

mierak commented 1 month ago

Thanks for the suggestions! No idea why I didnt implement scrolloff yet since I use it in my vim as well. Anyway, it is now in if you build from master: https://mierak.github.io/rmpc/configuration/#scrolloff

The non-wrapping Up/Down will happen soon too.

soifou commented 1 month ago

Wow... that was fast! I'm using it right now and it works nicely, thanks!

mierak commented 1 month ago

Glad it works fine! Anyway, the wrapping is now gone by default and can be configured back with https://mierak.github.io/rmpc/configuration/#wrap_navigation.

soifou commented 1 month ago

Mini feedback, I noticed the scrollback indicator is not in phase anymore. When the first item is selected, the scrollback is not at the very top but slightly below, and on a (very) long list, it disappears on the last items.

It looks like a regression.

mierak commented 1 month ago

Hmm, I cant reproduce the issue. Can you give me more info? Config and theme, terminal and maybe a screenshot would help.

soifou commented 1 month ago

Sure, I tracked down the issue and the culprit seems to be the symbols used for the scrollbar:

    scrollbar: (
        symbols: ["", "┃", "", ""],
        // ...
    ),

If I change with the default, there is no problem. I did not notice this in previous version.

mierak commented 1 month ago

Thanks! I see the problem now. Though for me its been there since forever, at least since 0.4.0. I'll look into it!

mierak commented 1 month ago

Fix is merged to master https://github.com/mierak/rmpc/pull/100

soifou commented 1 month ago

Confirmed 👍 thanks again :)