[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/mct ebe554061b 09/12: Accept nil value for mct-completi
From: |
ELPA Syncer |
Subject: |
[elpa] externals/mct ebe554061b 09/12: Accept nil value for mct-completion-window-size |
Date: |
Mon, 31 Jan 2022 08:57:46 -0500 (EST) |
branch: externals/mct
commit ebe554061b76247f7bd78b26f5d1ae58c55b5cdf
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Accept nil value for mct-completion-window-size
---
README.org | 3 +++
mct.el | 28 ++++++++++++++--------------
2 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/README.org b/README.org
index ff8bb74bfa..a960bb3e7b 100644
--- a/README.org
+++ b/README.org
@@ -145,6 +145,9 @@ or grow to show candidates within the specified boundaries.
To disable
this bouncing effect, set both max-height and min-height to the same
number.
+If set to nil, MCT will not try to fit the Completions' buffer to its
+window.
+
Other customizations:
#+vindex: mct-hide-completion-mode-line
diff --git a/mct.el b/mct.el
index 2feeffe931..05e5ef6e65 100644
--- a/mct.el
+++ b/mct.el
@@ -53,12 +53,15 @@ round number to 1/3 of the frame's height. While the
default
minimum height is 1. This means that during live completions the
Completions' window will shrink or grow to show candidates within
the specified boundaries. To disable this bouncing effect, set
-both max-height and min-height to the same number."
- :type '(cons
- (choice (function :tag "Function to determine maximum height")
- (natnum :tag "Maximum height in number of lines"))
- (choice (function :tag "Function to determine minimum height")
- (natnum :tag "Minimum height in number of lines")))
+both max-height and min-height to the same number.
+
+If nil, do not try to fit the Completions' buffer to its window."
+ :type '(choice (const :tag "Disable size constraints" nil)
+ (cons
+ (choice (function :tag "Function to determine maximum
height")
+ (natnum :tag "Maximum height in number of lines"))
+ (choice (function :tag "Function to determine minimum
height")
+ (natnum :tag "Minimum height in number of lines"))))
:group 'mct)
(defcustom mct-remove-shadowed-file-names nil
@@ -298,14 +301,11 @@ Can be used in `mct-completion-window-size'."
(defun mct--fit-completions-window (&rest _args)
"Fit Completions' buffer to its window."
- (when-let ((window (mct--get-completion-window)))
- ;; TODO 2022-01-28: Do we need the pixelwise adjustment?
- ;; (with-current-buffer (window-buffer window)
- ;; (setq-local window-resize-pixelwise t))
- (let* ((size mct-completion-window-size)
- (max (car size))
- (min (cdr size)))
- (fit-window-to-buffer window (mct--height max) (mct--height min)))))
+ (when-let* ((window (mct--get-completion-window))
+ (size mct-completion-window-size)
+ (max (car size))
+ (min (cdr size)))
+ (fit-window-to-buffer window (mct--height max) (mct--height min))))
(defun mct--minimum-input ()
"Test for minimum requisite input for live completions.
- [elpa] externals/mct updated (27c93a4932 -> f6610dd69b), ELPA Syncer, 2022/01/31
- [elpa] externals/mct d232c964b7 05/12: Declare commands as applicable to the region mode, ELPA Syncer, 2022/01/31
- [elpa] externals/mct ebe554061b 09/12: Accept nil value for mct-completion-window-size,
ELPA Syncer <=
- [elpa] externals/mct 76986b490f 08/12: Add another completion category to the sample, ELPA Syncer, 2022/01/31
- [elpa] externals/mct eb2394372f 04/12: Minor tweak to mct-backward-updir, ELPA Syncer, 2022/01/31
- [elpa] externals/mct 7af0a5e65e 11/12: Rewrite manual to make user options easier to find, ELPA Syncer, 2022/01/31
- [elpa] externals/mct bd2793e531 02/12: Remove out-of-date comment, ELPA Syncer, 2022/01/31
- [elpa] externals/mct 658666afee 01/12: Make obsolete a var that should be internal, ELPA Syncer, 2022/01/31
- [elpa] externals/mct ab19c21471 07/12: Streamline check for {pass, block}list, ELPA Syncer, 2022/01/31
- [elpa] externals/mct 7df5c4e4a0 03/12: Fix Emacs version check for one-column, ELPA Syncer, 2022/01/31
- [elpa] externals/mct e8acbe114c 10/12: Minor refinements to doc strings, ELPA Syncer, 2022/01/31
- [elpa] externals/mct d8c90ea987 06/12: Fix otherwise brilliant typo, ELPA Syncer, 2022/01/31
- [elpa] externals/mct f6610dd69b 12/12: Implement dynamic completion setup, ELPA Syncer, 2022/01/31