From: Tim Vaughan Date: Tue, 10 Dec 2019 08:15:16 +0000 (+0100) Subject: Always keep selected track centred in browser. X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=b8155ff95e704becb4a93e18d286ceee504b1463;p=emus.git Always keep selected track centred in browser. --- diff --git a/emus.el b/emus.el index e3d17f6..998a1e8 100644 --- a/emus.el +++ b/emus.el @@ -64,19 +64,19 @@ :type '(string)) (defface emus-artist - '((t :inherit font-lock-keyword-face :background "#333")) + '((t :inherit font-lock-string-face :background "#333")) "Face used for artist names in browser.") (defface emus-album - '((t :inherit font-lock-function-name-face :background "#222")) + '((t :inherit font-lock-constant-face :background "#222")) "Face used for album names in browser.") (defface emus-track - '((t :inherit font-lock-string-face)) + '((t :inherit font-lock-keyword-face)) "Face used for track titles in browser.") (defface emus-track-current - '((t :inherit font-lock-string-face :inverse-video t)) + '((t :inherit font-lock-keyword-face :inverse-video t)) "Face used for track titles in browser.") (defface emus-cursor @@ -241,6 +241,7 @@ (setq emus-current-track track) (emus--update-track old-track) (emus--update-track track) + (emus-centre-current) (emus--resume-cp)))) (defun emus-select-track (track) @@ -251,6 +252,7 @@ (setq emus-current-track track) (emus--update-track old-track) (emus--update-track track) + (emus-centre-current) (emus-send-cmd "o") (emus--resume-cp)))) @@ -459,7 +461,6 @@ (defun emus-centre-current () (interactive) (when (get-buffer "*emus*") - (switch-to-buffer "*emus*") (when emus-current-track (goto-char (emus-track-browser-pos emus-current-track)) (recenter))))