Revert restored revert of ee6e4a8b

Holy reverts Batman.
This commit is contained in:
Henrik Lissner 2019-03-14 00:31:59 -04:00
parent fba7bf7748
commit 60c965ded8
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395

View File

@ -93,17 +93,7 @@ immediately runs it on the current candidate (ending the ivy session)."
(colplist (plist-get plist :columns))
(switch-buffer-alist (assq 'ivy-rich-candidate colplist)))
(when switch-buffer-alist
(setcar switch-buffer-alist '+ivy-rich-buffer-name)))
(defun +ivy*rich-counsel-function-docstring (candidate)
(let ((doc (replace-regexp-in-string
":\\(\\(before\\|after\\)\\(-\\(whilte\\|until\\)\\)?\\|around\\|override\\|\\(filter-\\(args\\|return\\)\\)\\) advice:[ ]*.+?[\r\n]+"
""
(or (ignore-errors (documentation (intern-soft candidate))) ""))))
(if (string-match "^\\(.+\\)\\([\r\n]\\)?" doc)
(setq doc (match-string 1 doc))
"")))
(advice-add #'ivy-rich-counsel-function-docstring :override #'+ivy*rich-counsel-function-docstring))
(setcar switch-buffer-alist '+ivy-rich-buffer-name))))
(def-package! counsel