emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/mct 25f876c 34/70: Do not use line-based completion in


From: ELPA Syncer
Subject: [elpa] externals/mct 25f876c 34/70: Do not use line-based completion in grid views
Date: Thu, 11 Nov 2021 03:57:46 -0500 (EST)

branch: externals/mct
commit 25f876cb7b88c8f50bb0e216a3737af69cf0c08f
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Do not use line-based completion in grid views
    
    This extends commit 17abf47.
---
 mct.el | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/mct.el b/mct.el
index 5b0d435..65b4d5e 100644
--- a/mct.el
+++ b/mct.el
@@ -630,16 +630,18 @@ are always visible).
 This command can be invoked from either the minibuffer or the
 Completions' buffer."
   (interactive nil mct-mode)
-  (let ((mct-remove-shadowed-file-names t)
-        (mct-live-update-delay most-positive-fixnum)
-        (enable-recursive-minibuffers t))
-    (unless (mct--get-completion-window)
-      (mct--show-completions))
-    (if (or (and (derived-mode-p 'completion-list-mode)
-                 (active-minibuffer-window))
-            (and (minibufferp)
-                 (mct--get-completion-window)))
-        (mct--line-number-selection))))
+  (if (not (eq completions-format 'one-column))
+      (user-error "Cannot select by line in grid view")
+    (let ((mct-remove-shadowed-file-names t)
+          (mct-live-update-delay most-positive-fixnum)
+          (enable-recursive-minibuffers t))
+      (unless (mct--get-completion-window)
+        (mct--show-completions))
+      (if (or (and (derived-mode-p 'completion-list-mode)
+                   (active-minibuffer-window))
+              (and (minibufferp)
+                   (mct--get-completion-window)))
+          (mct--line-number-selection)))))
 
 (defvar crm-completion-table)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]