[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-posframe bda3116 093/195: Merge pull request #40 fr
From: |
Feng Shu |
Subject: |
[elpa] externals/ivy-posframe bda3116 093/195: Merge pull request #40 from CeleritasCelery/prompt |
Date: |
Sat, 3 Oct 2020 07:11:52 -0400 (EDT) |
branch: externals/ivy-posframe
commit bda3116e57382c1a084088969e1b6135ecb94c9a
Merge: bf6cf5d ba1bc4f
Author: tumashu <tumashu@163.com>
Commit: GitHub <noreply@github.com>
Merge pull request #40 from CeleritasCelery/prompt
Update prompt in dynamic collections
---
ivy-posframe.el | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
diff --git a/ivy-posframe.el b/ivy-posframe.el
index be8444a..27bb838 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -205,14 +205,7 @@ This variable is useful for `ivy-posframe-read-action' .")
(posframe-show
ivy-posframe-buffer
:font ivy-posframe-font
- :string
- (with-current-buffer (window-buffer (active-minibuffer-window))
- (let ((point (point))
- (string (if ivy-posframe--ignore-prompt
- str
- (concat (buffer-string) " " str))))
- (add-text-properties (- point 1) point '(face ivy-posframe-cursor)
string)
- string))
+ :string str
:position (point)
:poshandler poshandler
:background-color (face-attribute 'ivy-posframe :background nil t)
@@ -223,7 +216,8 @@ This variable is useful for `ivy-posframe-read-action' .")
:min-width (or ivy-posframe-min-width (round (* (frame-width) 0.62)))
:internal-border-width ivy-posframe-border-width
:internal-border-color (face-attribute 'ivy-posframe-border :background
nil t)
- :override-parameters ivy-posframe-parameters))))
+ :override-parameters ivy-posframe-parameters))
+ (ivy-posframe--add-prompt)))
(defun ivy-posframe-display (str)
(let ((func (intern (format "ivy-posframe-display-at-%s"
@@ -265,6 +259,19 @@ This variable is useful for `ivy-posframe-read-action' .")
(when (ivy-posframe-read-action)
(ivy-done)))
+(defun ivy-posframe--add-prompt ()
+ "Add the ivy prompt to the posframe."
+ (unless ivy-posframe--ignore-prompt
+ (with-current-buffer (window-buffer (active-minibuffer-window))
+ (let ((point (point))
+ (prompt (buffer-string)))
+ (remove-text-properties 0 (length prompt) '(read-only nil) prompt)
+ (with-current-buffer ivy-posframe-buffer
+ (goto-char (point-min))
+ (kill-line 1)
+ (insert prompt " \n")
+ (add-text-properties point (1+ point) '(face
ivy-posframe-cursor)))))))
+
(defun ivy-posframe-read-action ()
"Change the action to one of the available ones.
@@ -441,6 +448,7 @@ selection, non-nil otherwise."
(define-key ivy-minibuffer-map [remap ivy-avy] 'ivy-posframe-avy)
(define-key ivy-minibuffer-map [remap swiper-avy] 'ivy-posframe-swiper-avy)
(advice-add 'ivy--minibuffer-setup :around #'ivy-posframe--minibuffer-setup)
+ (advice-add 'ivy--queue-exhibit :after #'ivy-posframe--add-prompt)
(message "ivy-posframe is enabled, disabling it need to reboot emacs."))
;;;###autoload
- [elpa] externals/ivy-posframe 3c00455 050/195: Add ivy-posframe-swiper-avy, (continued)
- [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, 2020/10/03
- [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 <=
- [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
- [elpa] externals/ivy-posframe 0c2bf2c 095/195: Fix2 "ivy-posframe copies prompt text as kill" #41, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe d15c352 165/195: remove ivy-posframe--poframe-p-advice, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 10fd5c1 148/195: Fix `ivy-dispatching-done` is not working #45, Feng Shu, 2020/10/03