[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/posframe d16dfbd: poshandler about window: x and y do n
From: |
ELPA Syncer |
Subject: |
[elpa] externals/posframe d16dfbd: poshandler about window: x and y do not < 0. |
Date: |
Mon, 25 Oct 2021 05:57:27 -0400 (EDT) |
branch: externals/posframe
commit d16dfbdab1b62ca140bf4a39fedff812ae9a71ec
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
poshandler about window: x and y do not < 0.
* posframe.el (posframe-poshandler-p0.5p0-to-w0.5w0)
(posframe-poshandler-p0.5p0.5-to-w0.5w0.5)
(posframe-poshandler-p0.5p1-to-w0.5w1): x and y do not < 0.
---
posframe.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/posframe.el b/posframe.el
index a19192e..3d304f7 100644
--- a/posframe.el
+++ b/posframe.el
@@ -1271,8 +1271,8 @@ of INFO can be found in docstring of `posframe-show'."
(window-height (plist-get info :parent-window-height))
(posframe-width (plist-get info :posframe-width))
(posframe-height (plist-get info :posframe-height)))
- (cons (+ window-left (/ (- window-width posframe-width) 2))
- (+ window-top (/ (- window-height posframe-height) 2)))))
+ (cons (max 0 (+ window-left (/ (- window-width posframe-width) 2)))
+ (max 0 (+ window-top (/ (- window-height posframe-height) 2))))))
(defalias 'posframe-poshandler-window-top-left-corner
#'posframe-poshandler-p0p0-to-w0w0)
(defun posframe-poshandler-p0p0-to-w0w0 (info)
@@ -1309,7 +1309,7 @@ INFO can be found in docstring of `posframe-show'."
(window-top (plist-get info :parent-window-top))
(window-width (plist-get info :parent-window-width))
(posframe-width (plist-get info :posframe-width)))
- (cons (+ window-left (/ (- window-width posframe-width) 2))
+ (cons (max 0 (+ window-left (/ (- window-width posframe-width) 2)))
window-top)))
(defalias 'posframe-poshandler-window-bottom-left-corner
#'posframe-poshandler-p0p1-to-w0w1)
@@ -1358,7 +1358,7 @@ INFO can be found in docstring of `posframe-show'."
(posframe-width (plist-get info :posframe-width))
(posframe-height (plist-get info :posframe-height))
(mode-line-height (plist-get info :mode-line-height)))
- (cons (+ window-left (/ (- window-width posframe-width) 2))
+ (cons (max 0 (+ window-left (/ (- window-width posframe-width) 2)))
(+ window-top window-height
(- 0 mode-line-height posframe-height)))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/posframe d16dfbd: poshandler about window: x and y do not < 0.,
ELPA Syncer <=