diff options
| author | Feng Shu <tumashu@163.com> | 2020-10-05 09:19:51 +0800 |
|---|---|---|
| committer | Feng Shu <tumashu@163.com> | 2020-10-05 09:19:51 +0800 |
| commit | 1e602a7bf66a5d9c97069c48eec2a10aaef0b421 (patch) | |
| tree | 9bf64bc9d2754d62ad61cd23fa6733d501369546 | |
| parent | 1beb31be468ec16924aad2c804ce9d8cfe22dfeb (diff) | |
* ivy-posframe.el (ivy-posframe--swiper-avy-candidate): Do not use cl-letf
| -rw-r--r-- | ivy-posframe.el | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/ivy-posframe.el b/ivy-posframe.el index d3ee6d1..f1b9ecb 100644 --- a/ivy-posframe.el +++ b/ivy-posframe.el @@ -435,8 +435,20 @@ This variable is useful for `ivy-posframe-read-action' .") (defun ivy-posframe--swiper-avy-candidate () "Ivy-posframe's `swiper--avy-candidate'." - (cl-letf (((symbol-function 'swiper--avy-candidates) #'ivy-posframe--swiper-avy-candidates)) - (swiper--avy-candidate))) + (let ((candidates (ivy-posframe--swiper-avy-candidates)) + (avy-all-windows nil)) + (unwind-protect + (prog2 + (avy--make-backgrounds + (append (avy-window-list) + (list (ivy-state-window ivy-last)))) + (if (eq avy-style 'de-bruijn) + (avy-read-de-bruijn candidates avy-keys) + (avy-read (avy-tree candidates avy-keys) + #'avy--overlay-post + #'avy--remove-leading-chars)) + (avy-push-mark)) + (avy--done)))) (defun ivy-posframe--swiper-avy-goto (candidate) "Ivy-posframe's `swiper--avy-goto'." |
