aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emms-playlist-mode.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/emms-playlist-mode.el b/emms-playlist-mode.el
index d3e13ee..103bdb7 100644
--- a/emms-playlist-mode.el
+++ b/emms-playlist-mode.el
@@ -455,11 +455,17 @@ When NO-NEWLINE is non-nil, do not insert a newline after the track."
(let ((track-region (emms-property-region (point)
'emms-track))
(track (get-text-property (point)
- 'emms-track)))
+ 'emms-track))
+ (selectedp (emms-playlist-selected-track-at-p)))
(save-excursion
(delete-region (car track-region)
(cdr track-region))
- (emms-playlist-mode-insert-track track t)))))
+ (when selectedp
+ (delete-overlay emms-playlist-mode-selected-overlay)
+ (setq emms-playlist-mode-selected-overlay nil))
+ (emms-playlist-mode-insert-track track t))
+ (when selectedp
+ (emms-playlist-select (point))))))
;;; --------------------------------------------------------
;;; Entry