[PR #767] [CLOSED] Implement movement counts for up/down navigation #1024

Closed
opened 2026-02-28 14:54:12 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Rigellute/spotify-tui/pull/767
Author: @amgassert
Created: 3/18/2021
Status: Closed

Base: masterHead: movement_counts


📝 Commits (2)

  • 839baf0 Implement movement counts for up/down navigation
  • 82f8755 Add .idea/ to .gitignore

📊 Changes

18 files changed (+213 additions, -46 deletions)

View changed files

📝 .gitignore (+1 -0)
📝 src/app.rs (+2 -0)
📝 src/handlers/album_list.rs (+11 -4)
📝 src/handlers/album_tracks.rs (+5 -0)
📝 src/handlers/artist.rs (+7 -0)
📝 src/handlers/artist_albums.rs (+2 -0)
📝 src/handlers/artists.rs (+11 -4)
📝 src/handlers/common_key_events.rs (+94 -14)
📝 src/handlers/episode_table.rs (+11 -4)
📝 src/handlers/library.rs (+7 -2)
📝 src/handlers/made_for_you.rs (+11 -4)
📝 src/handlers/playlist.rs (+11 -4)
📝 src/handlers/podcasts.rs (+11 -4)
📝 src/handlers/recently_played.rs (+3 -0)
📝 src/handlers/search_results.rs (+11 -0)
📝 src/handlers/select_device.rs (+10 -4)
📝 src/handlers/track_table.rs (+3 -0)
📝 src/user_config.rs (+2 -2)

📄 Description

Overview
Implements movement counts for up/down navigation. E.g. pressing "5j" moves the selection index down by five, and "5k" moves it up by five. I plan to add absolute and relative line numbering eventually to make this feature more useful.

Testing
Added some tests. cargo test passes.

I manually checked the following:

  • Happy-path up/down movements with counts
  • Wrapping behavior is preserved when movement count is one, selection is the first element, and movement is up
  • Wrapping behavior is preserved when movement count is one, selection is the last element, and movement is down
  • When movement count is larger than one and results in an out-of-bounds index, the index is set to 0 if moving up and length - 1 if moving down.

I'm pretty sure I got every list. Please double-check and let me know if I missed anything.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Rigellute/spotify-tui/pull/767 **Author:** [@amgassert](https://github.com/amgassert) **Created:** 3/18/2021 **Status:** ❌ Closed **Base:** `master` ← **Head:** `movement_counts` --- ### 📝 Commits (2) - [`839baf0`](https://github.com/Rigellute/spotify-tui/commit/839baf0732dac41d1795c34d41b7889bd426355a) Implement movement counts for up/down navigation - [`82f8755`](https://github.com/Rigellute/spotify-tui/commit/82f87557e61104e9c6441669af311a966df438da) Add .idea/ to .gitignore ### 📊 Changes **18 files changed** (+213 additions, -46 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+1 -0) 📝 `src/app.rs` (+2 -0) 📝 `src/handlers/album_list.rs` (+11 -4) 📝 `src/handlers/album_tracks.rs` (+5 -0) 📝 `src/handlers/artist.rs` (+7 -0) 📝 `src/handlers/artist_albums.rs` (+2 -0) 📝 `src/handlers/artists.rs` (+11 -4) 📝 `src/handlers/common_key_events.rs` (+94 -14) 📝 `src/handlers/episode_table.rs` (+11 -4) 📝 `src/handlers/library.rs` (+7 -2) 📝 `src/handlers/made_for_you.rs` (+11 -4) 📝 `src/handlers/playlist.rs` (+11 -4) 📝 `src/handlers/podcasts.rs` (+11 -4) 📝 `src/handlers/recently_played.rs` (+3 -0) 📝 `src/handlers/search_results.rs` (+11 -0) 📝 `src/handlers/select_device.rs` (+10 -4) 📝 `src/handlers/track_table.rs` (+3 -0) 📝 `src/user_config.rs` (+2 -2) </details> ### 📄 Description **Overview** Implements movement counts for up/down navigation. E.g. pressing "5j" moves the selection index down by five, and "5k" moves it up by five. I plan to add absolute and relative line numbering eventually to make this feature more useful. **Testing** Added some tests. `cargo test` passes. I manually checked the following: - Happy-path up/down movements with counts - Wrapping behavior is preserved when movement count is one, selection is the first element, and movement is up - Wrapping behavior is preserved when movement count is one, selection is the last element, and movement is down - When movement count is larger than one and results in an out-of-bounds index, the index is set to 0 if moving up and length - 1 if moving down. I'm pretty sure I got every list. Please double-check and let me know if I missed anything. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 14:54:12 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-tui#1024
No description provided.