branch: externals/mct commit 25f876cb7b88c8f50bb0e216a3737af69cf0c08f Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@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)