remove obsolete fix
This commit is contained in:
@@ -59,20 +59,6 @@
|
|||||||
:init (require 'ivy-rich-autoloads)
|
:init (require 'ivy-rich-autoloads)
|
||||||
:config
|
:config
|
||||||
(setcdr (assq t ivy-format-functions-alist) #'ivy-format-function-line)
|
(setcdr (assq t ivy-format-functions-alist) #'ivy-format-function-line)
|
||||||
;; overwrite to fix error, see https://github.com/Yevgnen/ivy-rich/issues/115#issuecomment-1336951680
|
|
||||||
(defun ivy-rich--switch-buffer-directory (candidate)
|
|
||||||
"Return directory of file visited by buffer named CANDIDATE, or nil if no file."
|
|
||||||
(let* ((buffer (get-buffer candidate))
|
|
||||||
(fn (buffer-file-name buffer)))
|
|
||||||
;; if valid filename, i.e. buffer visiting file:
|
|
||||||
(if fn
|
|
||||||
;; return containing directory
|
|
||||||
;; (directory-file-name fn) ;; REMOVED
|
|
||||||
(file-name-directory fn) ;; ADDED
|
|
||||||
;; else if mode explicitly offering list-buffers-directory, return that; else nil.
|
|
||||||
;; buffers that don't explicitly visit files, but would like to show a filename,
|
|
||||||
;; e.g. magit or dired, set the list-buffers-directory variable
|
|
||||||
(buffer-local-value 'list-buffers-directory buffer))))
|
|
||||||
(require 'all-the-icons-ivy-rich) ;; as suggested load `all-the-icons-ivy-rich-mode' before `ivy-rich-mode'
|
(require 'all-the-icons-ivy-rich) ;; as suggested load `all-the-icons-ivy-rich-mode' before `ivy-rich-mode'
|
||||||
(ivy-rich-mode 1))
|
(ivy-rich-mode 1))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user