cplay-ng

simple curses audio player
git clone https://git.ce9e.org/cplay-ng.git

commit
cae896037a4c579bf183b620b4d69701267c1c9b
parent
65ea9eb84a921c554c603b1902260b85762995d2
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2026-03-15 20:04
fix: move cursor when deleting the last item

Diffstat

M cplay.py 2 ++

1 files changed, 2 insertions, 0 deletions


diff --git a/cplay.py b/cplay.py

@@ -572,6 +572,8 @@ class Playlist(List):
  572   572         elif self.active > self.cursor:
  573   573             self.active -= 1
  574   574 
   -1   575         self.move_cursor(0)
   -1   576 
  575   577     def move_item(self, direction):
  576   578         new_cursor = clamp(self.cursor + direction, 0, len(self.items) - 1)
  577   579