branch: externals/ampc
commit c41fde637dd47c4eaade5611cf21e319b69dd2c0
Author: Christopher Schmidt <christop...@ch.ristopher.com>
Commit: Christopher Schmidt <christop...@ch.ristopher.com>

    * ampc.el (ampc-goto-current-song): Goto point-min if there is no song 
currently
    playing.
---
 ampc.el | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/ampc.el b/ampc.el
index 7f41be5e60..bff0b1971d 100644
--- a/ampc.el
+++ b/ampc.el
@@ -1979,13 +1979,13 @@ Interactively, read NAME from the minibuffer."
   "Select the current playlist window and move point to the current song."
   (interactive)
   (assert (ampc-in-ampc-p))
-  (when song
-    (ampc-with-buffer 'current-playlist
-      no-se
-      (select-window (ampc-get-window 'current-playlist))
+  (ampc-with-buffer 'current-playlist
+    no-se
+    (select-window (ampc-get-window 'current-playlist))
+    (when song
       (goto-char (point-min))
-      (forward-line (string-to-number song))
-      (ampc-align-point))))
+      (forward-line (string-to-number song)))
+    (ampc-align-point)))
 
 (defun ampc-previous-line (&optional arg)
   "Go to previous ARG'th entry in the current buffer.

Reply via email to