fix(ibuffer): wrong-number-of-args error on ibuffer-find-file w/ ivy
This commit is contained in:
parent
42e5763782
commit
0140a419fd
1 changed files with 10 additions and 7 deletions
|
@ -60,13 +60,16 @@
|
||||||
(defadvice! +ibuffer-use-counsel-maybe-a (_file &optional _wildcards)
|
(defadvice! +ibuffer-use-counsel-maybe-a (_file &optional _wildcards)
|
||||||
"Use `counsel-find-file' instead of `find-file'."
|
"Use `counsel-find-file' instead of `find-file'."
|
||||||
:override #'ibuffer-find-file
|
:override #'ibuffer-find-file
|
||||||
(interactive)
|
(interactive
|
||||||
(counsel-find-file
|
(let* ((buf (ibuffer-current-buffer))
|
||||||
(let ((buf (ibuffer-current-buffer)))
|
(default-directory (if (buffer-live-p buf)
|
||||||
(if (buffer-live-p buf)
|
|
||||||
(with-current-buffer buf
|
(with-current-buffer buf
|
||||||
default-directory)
|
default-directory)
|
||||||
default-directory)))))
|
default-directory)))
|
||||||
|
(list (counsel--find-file-1 "Find file: " nil
|
||||||
|
#'identity
|
||||||
|
'counsel-find-file) t)))
|
||||||
|
(find-file _file _wildcards)))
|
||||||
|
|
||||||
(map! :map ibuffer-mode-map :n "q" #'kill-current-buffer))
|
(map! :map ibuffer-mode-map :n "q" #'kill-current-buffer))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue