[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-posframe 8d18644 072/195: Revert "Revert "Simplify
From: |
Feng Shu |
Subject: |
[elpa] externals/ivy-posframe 8d18644 072/195: Revert "Revert "Simplify ivy-postframe-avy"" |
Date: |
Sat, 3 Oct 2020 07:11:47 -0400 (EDT) |
branch: externals/ivy-posframe
commit 8d18644d0320f6c009ec7e1a96e88e8266a6d1c8
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
Revert "Revert "Simplify ivy-postframe-avy""
This reverts commit f6f07cf34feb4a7389386db4a617b04c5e4fa9b1.
---
ivy-posframe.el | 49 +++++--------------------------------------------
1 file changed, 5 insertions(+), 44 deletions(-)
diff --git a/ivy-posframe.el b/ivy-posframe.el
index 18a31e4..3736df4 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -207,7 +207,7 @@ This variable is useful for `ivy-posframe-read-action' .")
(if (not (ivy-posframe-workable-p))
(ivy-display-function-fallback str)
(setq ivy-posframe--display-p t)
- (with-selected-window (ivy--get-window ivy-last)
+ (with-ivy-window
(posframe-show
ivy-posframe-buffer
:font ivy-posframe-font
@@ -318,13 +318,6 @@ selection, non-nil otherwise."
(setcar actions (1+ action-idx))
(ivy-set-action actions)))))))
-(defun ivy-posframe--avy-action (pt)
- "Finish ivy session with the candidate at PT."
- (with-current-buffer ivy-posframe-buffer
- (ivy--done
- (substring-no-properties
- (nth (- (line-number-at-pos pt) 2) ivy--old-cands)))))
-
(defun ivy-posframe--window ()
"Return the posframe window displaying `ivy-posframe-buffer'."
(frame-selected-window
@@ -333,46 +326,14 @@ selection, non-nil otherwise."
(defvar avy-all-windows)
(defvar avy-keys)
-(defvar avy-keys-alist)
(defvar avy-style)
-(defvar avy-styles-alist)
-(defvar avy-action)
-(declare-function avy--process "avy")
-(declare-function avy--style-fn "avy")
+
(defun ivy-posframe-avy ()
"Jump to one of the current ivy candidates."
(interactive)
- (unless (require 'avy nil 'noerror)
- (error "Package avy isn't installed"))
- (unless (boundp 'avy-pre-action)
- (error "A newer version of avy is required for this command"))
- (let* ((avy-all-windows nil)
- (avy-keys (or (cdr (assq 'ivy-avy avy-keys-alist))
- avy-keys))
- (avy-style (or (cdr (assq 'ivy-avy
- avy-styles-alist))
- avy-style))
- ;; prevent default pre action, which calls
- ;; `select-frame-set-input-focus', deselecting the minibuffer and
- ;; causing `ivy-posframe-cleanup' to run prematurely
- (avy-pre-action #'ignore)
- (window (ivy-posframe--window))
- candidates)
- (with-current-buffer ivy-posframe-buffer
- (save-excursion
- (save-restriction
- (narrow-to-region
- (window-start window)
- (window-end window))
- (goto-char (point-min))
- (forward-line)
- (while (< (point) (point-max))
- (push (cons (point) window) candidates)
- (forward-line)))))
- (setq avy-action #'ivy-posframe--avy-action)
- (avy--process
- (nreverse candidates)
- (avy--style-fn avy-style))))
+ (let ((avy-pre-action #'ignore))
+ (with-selected-window (ivy-posframe--window)
+ (ivy-avy))))
(declare-function avy--make-backgrounds "avy")
(declare-function avy-window-list "avy")
- [elpa] externals/ivy-posframe 60e1f99 045/195: add variable to customize ivy-posframe style, (continued)
- [elpa] externals/ivy-posframe 60e1f99 045/195: add variable to customize ivy-posframe style, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe aec9d8a 058/195: Update ivy-posframe README, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 704feb2 062/195: Let ivy-posframe only inhert default, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 3c00455 050/195: Add ivy-posframe-swiper-avy, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 9e5c4a9 060/195: Fix: Should the default width be the frame instead of the window? #22, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 0254f6e 065/195: Add document about border, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe f341bae 061/195: Add blank line, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe f6f07cf 056/195: Revert "Simplify ivy-postframe-avy", Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 8799af1 069/195: Revert "Add ivy-posframe-border face and use it", Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 26612b2 071/195: Add ivy-posframe-border face and use it, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 8d18644 072/195: Revert "Revert "Simplify ivy-postframe-avy"",
Feng Shu <=
- [elpa] externals/ivy-posframe 31363f3 076/195: Get correct prompt for recursive minibuffers, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe bf6cf5d 091/195: Merge pull request #39 from conao3/require-ivy-0.11.0, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe bda3116 093/195: Merge pull request #40 from CeleritasCelery/prompt, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 6de9801 097/195: remove unneeded ivy require code, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe a7fe06e 098/195: fix addition ivy-display-function-props, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 3aabf14 085/195: ivy-posframe-demo: let it toggle, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe e6f4e1c 088/195: Fix ""ivy-posframe-font seems take no effect." #36, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe d5dd254 075/195: Update README, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe d29f788 089/195: Again fix ivy-posframe-font seems take no effect. #36, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe fd9c072 090/195: requires ivy v0.11.0, Feng Shu, 2020/10/03