[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/corfu 7155196 05/16: Simplify
From: |
Protesilaos Stavrou |
Subject: |
[elpa] externals/corfu 7155196 05/16: Simplify |
Date: |
Wed, 28 Apr 2021 14:20:02 -0400 (EDT) |
branch: externals/corfu
commit 7155196f2065a8bd474ba6551d150c19cf4063e4
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Simplify
---
corfu.el | 62 +++++++++++++++++++++++++++++---------------------------------
1 file changed, 29 insertions(+), 33 deletions(-)
diff --git a/corfu.el b/corfu.el
index 8fd4514..a15f21c 100644
--- a/corfu.el
+++ b/corfu.el
@@ -192,13 +192,11 @@ Set to nil in order to disable confirmation."
(let* ((window-min-height 1)
(window-min-width 1)
(after-make-frame-functions)
- (frame-resize-pixelwise t)
- (window-resize-pixelwise t)
(edge (window-inside-pixel-edges))
(lh (line-pixel-height))
(x (max 0 (min (+ (car edge) x) (- (frame-pixel-width) width))))
(y (+ (cadr edge) y))
- (y (if (> (+ y lh height) (frame-pixel-height))
+ (y (if (> (+ y height (* 3 lh)) (frame-pixel-height))
(- y height)
(+ y lh))))
(setq corfu--popup-buffer (or corfu--popup-buffer (generate-new-buffer "
*corfu*")))
@@ -219,37 +217,35 @@ Set to nil in order to disable confirmation."
(let (inhibit-modification-hooks)
(erase-buffer)
(insert content)))
- (setq corfu--popup-frame
- (or corfu--popup-frame
- (make-frame
- `((parent-frame . ,(window-frame))
- (background-color . ,(face-attribute 'corfu-background
:background))
- (no-accept-focus . t)
- (min-width . t)
- (min-height . t)
- (width . 0)
- (height . 0)
- (line-spacing . 0)
- (border-width . 0)
- (internal-border-width . 0)
- (left-fringe . 0)
- (right-fringe . 0)
- (vertical-scroll-bars . nil)
- (horizontal-scroll-bars . nil)
- (menu-bar-lines . 0)
- (tool-bar-lines . 0)
- (tab-bar-lines . 0)
- (no-other-frame . t)
- (unsplittable . t)
- (undecorated . t)
- (visibility . nil)
- (cursor-type . nil)
- (minibuffer . nil)
- (no-special-glyphs . t)))))
- (set-window-buffer (frame-root-window corfu--popup-frame)
corfu--popup-buffer)
- (set-frame-size corfu--popup-frame width height t)
+ (unless corfu--popup-frame
+ (setq corfu--popup-frame
+ (make-frame
+ `((parent-frame . ,(window-frame))
+ (background-color . ,(face-attribute 'corfu-background
:background))
+ (no-accept-focus . t)
+ (min-width . t)
+ (min-height . t)
+ (width . 0)
+ (height . 0)
+ (line-spacing . 0)
+ (border-width . 0)
+ (internal-border-width . 0)
+ (left-fringe . 0)
+ (right-fringe . 0)
+ (vertical-scroll-bars . nil)
+ (horizontal-scroll-bars . nil)
+ (menu-bar-lines . 0)
+ (tool-bar-lines . 0)
+ (tab-bar-lines . 0)
+ (no-other-frame . t)
+ (unsplittable . t)
+ (undecorated . t)
+ (cursor-type . nil)
+ (minibuffer . nil)
+ (no-special-glyphs . t))))
+ (set-window-buffer (frame-root-window corfu--popup-frame)
corfu--popup-buffer))
(set-frame-position corfu--popup-frame x y)
- (make-frame-visible corfu--popup-frame)))
+ (set-frame-size corfu--popup-frame width height t)))
(defun corfu--popup (pos lines &optional curr lo bar)
"Show LINES as popup at POS, with CURR highlighted and scrollbar from LO to
LO+BAR."
- [elpa] externals/corfu updated (5d59adc -> a53a98a), Protesilaos Stavrou, 2021/04/28
- [elpa] externals/corfu fef8377 02/16: Add popup comment (See #10 and #15), Protesilaos Stavrou, 2021/04/28
- [elpa] externals/corfu 5951abd 04/16: Reorder exit conditions, Protesilaos Stavrou, 2021/04/28
- [elpa] externals/corfu 7155196 05/16: Simplify,
Protesilaos Stavrou <=
- [elpa] externals/corfu 59a3037 06/16: Ensure that overlay is deleted properly, Protesilaos Stavrou, 2021/04/28
- [elpa] externals/corfu 9eb9ae6 08/16: Keep frame alive for performance, Protesilaos Stavrou, 2021/04/28
- [elpa] externals/corfu e5dad66 09/16: Use internal border, Protesilaos Stavrou, 2021/04/28
- [elpa] externals/corfu e4d66b6 10/16: Use spaces for border/bar instead of image, Protesilaos Stavrou, 2021/04/28
- [elpa] externals/corfu cdd215d 13/16: Ensure that frame buffer is set, Protesilaos Stavrou, 2021/04/28
- [elpa] externals/corfu a53a98a 16/16: Simplify face definitions, Protesilaos Stavrou, 2021/04/28
- [elpa] externals/corfu 59949d3 03/16: Use child frames instead of overlays, Protesilaos Stavrou, 2021/04/28
- [elpa] externals/corfu 9aa922d 01/16: Use `vertical-motion` instead of `forward-line`, Protesilaos Stavrou, 2021/04/28
- [elpa] externals/corfu 4f6aac9 07/16: Ensure that documentation/location frame still works with child-frame popup, Protesilaos Stavrou, 2021/04/28
- [elpa] externals/corfu aab3bb5 11/16: Use redraw-frame, Protesilaos Stavrou, 2021/04/28