The Lambda Lab
/
projects
/
emus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
55bcbad
)
Cleaned up centering behaviour.
author
Tim Vaughan
<timv@ughan.xyz>
Thu, 12 Dec 2019 12:18:40 +0000
(13:18 +0100)
committer
Tim Vaughan
<timv@ughan.xyz>
Thu, 12 Dec 2019 12:18:40 +0000
(13:18 +0100)
emus.el
patch
|
blob
|
history
diff --git
a/emus.el
b/emus.el
index
12c57f1
..
e529697
100644
(file)
--- a/
emus.el
+++ b/
emus.el
@@
-511,16
+511,16
@@
Used to update browser display when `emus-current-track' and/or `emus-state' cha
(defun emus-centre-current ()
"Centre the current track in the browser buffer, if available."
(interactive)
(defun emus-centre-current ()
"Centre the current track in the browser buffer, if available."
(interactive)
- (when (
get-buffer "*emus*"
)
- (when emus-current-track
+ (when (
and (eq (current-buffer) (get-buffer "*emus*")
)
+ emus-current-track)
(goto-char (emus-track-browser-pos emus-current-track))
(goto-char (emus-track-browser-pos emus-current-track))
- (recenter)))
)
+ (recenter)))
(defun emus-browse ()
"Switch to *emus* audio library browser."
(interactive)
(emus--with-library
(defun emus-browse ()
"Switch to *emus* audio library browser."
(interactive)
(emus--with-library
- (
switch
-to-buffer "*emus*")
+ (
pop
-to-buffer "*emus*")
(emus-browser-mode)
(emus--render-tracks)
(emus-centre-current)))
(emus-browser-mode)
(emus--render-tracks)
(emus-centre-current)))