Skip to content

Commit

Permalink
Fix preselection when killing buffers persistently.
Browse files Browse the repository at this point in the history
* helm-buffers.el (helm-buffers-persistent-kill-1): Do it.
  • Loading branch information
thierryvolpiatto committed Feb 5, 2015
1 parent 67513db commit 8f46336
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions helm-buffers.el
Expand Up @@ -691,13 +691,20 @@ If REGEXP-FLAG is given use `query-replace-regexp'."
(let ((marked (helm-marked-candidates)))
(unwind-protect
(cl-loop for b in marked
do (progn (helm-preselect (format "^%s\\_>" b))
do (progn (helm-preselect (format "^%s"
(regexp-quote
(if helm-buffer-max-length
(helm-substring-by-width
b helm-buffer-max-length
"")
b))))
(when (y-or-n-p (format "kill buffer (%s)? " b))
(helm-buffers-persistent-kill-1 b)
(message nil))))
(helm-buffers-persistent-kill-1 b))
(message nil)))
(with-helm-buffer
(setq helm-marked-candidates nil
helm-visible-mark-overlays nil)))))
helm-visible-mark-overlays nil))
(helm-force-update))))

(defun helm-buffers-list-persistent-action (candidate)
(if current-prefix-arg
Expand Down

0 comments on commit 8f46336

Please sign in to comment.