[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-posframe 8a54dbb 011/195: Use ivy-display-function-
From: |
Feng Shu |
Subject: |
[elpa] externals/ivy-posframe 8a54dbb 011/195: Use ivy-display-function-fallback |
Date: |
Sat, 3 Oct 2020 07:11:35 -0400 (EDT) |
branch: externals/ivy-posframe
commit 8a54dbba1a088f098eadc9c0007e54869f849c30
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
Use ivy-display-function-fallback
---
ivy-posframe.el | 32 +++++++++++++++++---------------
1 file changed, 17 insertions(+), 15 deletions(-)
diff --git a/ivy-posframe.el b/ivy-posframe.el
index c1bea4c..19fbba3 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -49,7 +49,6 @@
(require 'ivy)
(push '(ivy-posframe-display
- :check ivy-posframe-workable-p
:cleanup ivy-posframe-cleanup)
ivy-display-functions-props)
@@ -81,23 +80,26 @@ More details can be found in docstring of `posframe-show'."
(defun ivy-posframe-display (str)
"Show ivy's posframe."
- (with-selected-window (ivy--get-window ivy-last)
- (posframe-show
- ivy-posframe-buffer
- :font ivy-posframe-font
- :string (concat ivy--prompt ivy-text str)
- :position (point)
- :poshandler (or ivy-posframe-poshandler
- #'posframe-poshandler-window-bottom-left-corner)
- :background-color (face-attribute 'ivy-posframe :background)
- :foreground-color (face-attribute 'ivy-posframe :foreground)
- :height ivy-height
- :min-height 10
- :min-width 50)))
+ (if (not (ivy-posframe-workable-p))
+ (ivy-display-function-fallback str)
+ (with-selected-window (ivy--get-window ivy-last)
+ (posframe-show
+ ivy-posframe-buffer
+ :font ivy-posframe-font
+ :string (concat ivy--prompt ivy-text str)
+ :position (point)
+ :poshandler (or ivy-posframe-poshandler
+ #'posframe-poshandler-window-bottom-left-corner)
+ :background-color (face-attribute 'ivy-posframe :background)
+ :foreground-color (face-attribute 'ivy-posframe :foreground)
+ :height ivy-height
+ :min-height 10
+ :min-width 50))))
(defun ivy-posframe-cleanup ()
"Clean ivy's posframe."
- (posframe-hide ivy-posframe-buffer))
+ (when (ivy-posframe-workable-p)
+ (posframe-hide ivy-posframe-buffer)))
(defun ivy-posframe-workable-p ()
"Test ivy-posframe workable or not."
- [elpa] externals/ivy-posframe 8861e54 002/195: Use ivy-display-functions-props, (continued)
- [elpa] externals/ivy-posframe 8861e54 002/195: Use ivy-display-functions-props, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 229caae 003/195: update, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 3bc6301 004/195: Add ivy-posframe-workable-p, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 2733fe1 010/195: Set :position to (point)., Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe f287da7 006/195: Add ivy-posframe-mode, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 990b9b4 007/195: Update, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 8d0b0ae 008/195: Update, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe fc0820a 009/195: Update, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 1651770 012/195: Update, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 6494b38 005/195: Add ivy-posframe-mode, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 8a54dbb 011/195: Use ivy-display-function-fallback,
Feng Shu <=
- [elpa] externals/ivy-posframe 8a3ecb3 014/195: package-require ivy, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 0136107 015/195: Remove ivy-posframe-mode, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 2546238 016/195: reuse minibuffer's ivy prompt, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 9db2b75 017/195: Update README, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 550c322 018/195: Fix warn, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe c36250a 013/195: Update README, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe cef74e6 021/195: Different command can set different ivy-posframe display function, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 5482c07 024/195: Update README, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 1f3dbf4 026/195: Add ivy-posframe-setup and use it., Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 0be1372 029/195: Remove ivy-posframe-style variable, Feng Shu, 2020/10/03