Skip to content

Commit

Permalink
Apply counsel-switch-buffer patch
Browse files Browse the repository at this point in the history
  • Loading branch information
anildigital committed Feb 21, 2023
1 parent 3deed7b commit af1d46b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion anil/anil-counsel.el
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
("d" (lambda (file) (setq recentf-list (delete file recentf-list)))
"delete from recentf")))

(defun ivy-rich--switch-buffer-directory! (orig-fun &rest args)
(cl-letf (((symbol-function 'directory-file-name) #'file-name-directory))
(apply orig-fun args)))
(advice-add 'ivy-rich--switch-buffer-directory :around #'ivy-rich--switch-buffer-directory!)

(defun anil/counsel-buffer-or-recentf-candidates ()
"Return candidates for `counsel-buffer-or-recentf'."
(require 'recentf)
Expand All @@ -41,7 +46,7 @@
:bind ("M-x" . counsel-M-x)
("C-x C-f" . counsel-find-file)
("C-x C-r" . counsel-recentf)
("C-x b" . counsel-projectile-switch-to-buffer)
("C-x b" . counsel-switch-buffer)
("C-M-o" . counsel-imenu)
)

Expand Down

0 comments on commit af1d46b

Please sign in to comment.