summaryrefslogtreecommitdiff
path: root/helm-buffers.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2017-11-03 08:21:48 +0100
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2017-11-03 08:21:48 +0100
commit8b67ca172854320d63680b12afd0abc9bcd803ec (patch)
tree51c7ed7530b490d8cc09a4887d12799171c5c95f /helm-buffers.el
parent9395564aa36b18d54a100e916ae77c0a5298952c (diff)
Fix preselection for buffer listing (#1911)
* helm-buffers.el (helm-toggle-buffers-details): Do it.
Diffstat (limited to 'helm-buffers.el')
-rw-r--r--helm-buffers.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/helm-buffers.el b/helm-buffers.el
index 15075bbd..49f4a6a3 100644
--- a/helm-buffers.el
+++ b/helm-buffers.el
@@ -436,10 +436,14 @@ Should be called after others transformers i.e (boring buffers)."
(defun helm-toggle-buffers-details ()
(interactive)
(with-helm-alive-p
- (let ((preselect (helm-buffer--get-preselection
- (helm-get-selection))))
+ (let* ((buf (helm-get-selection))
+ (preselect (helm-buffer--get-preselection buf)))
(setq helm-buffer-details-flag (not helm-buffer-details-flag))
- (helm-update preselect))))
+ (helm-update (lambda ()
+ (helm-awhile (re-search-forward preselect nil t)
+ (helm-mark-current-line)
+ (when (equal buf (helm-get-selection))
+ (cl-return t))))))))
(put 'helm-toggle-buffers-details 'helm-only t)
(defun helm-buffers--pattern-sans-filters (&optional separator)