emacs: stop reversing the vertico layout

It works fine most of the time, except when the text is too large and
the contents of the minibuffer consist of candidates with long lines.
There may be other issues as well, but this is the obvious one that I
would encounter frequently while doing 'consult-outline' on, say, my
prot-emacs.org file while using any 'fontaine' preset with a default
font size greater than 'medium'.
This commit is contained in:
Protesilaos Stavrou 2025-09-17 16:45:39 +03:00
parent 1aa17d616a
commit 233ec940d2
No known key found for this signature in database
GPG key ID: 99BD6459CD5CA3EA
2 changed files with 20 additions and 20 deletions

View file

@ -17773,16 +17773,16 @@ Else do `vertico-exit'."
(t
(vertico-exit))))
(cl-defgeneric vertico--display-candidates (lines)
"Reverse the default vertico view of LINES."
(move-overlay vertico--candidates-ov (point-min) (point-min))
;; (setq lines (nreverse lines))
(unless (eq vertico-resize t)
(setq lines (nconc (make-list (max 0 (- vertico-count (length lines))) "\n") lines)))
(let ((string (apply #'concat lines)))
(add-face-text-property 0 (length string) 'default 'append string)
(overlay-put vertico--candidates-ov 'before-string string)
(overlay-put vertico--candidates-ov 'after-string nil)))
;; (cl-defgeneric vertico--display-candidates (lines)
;; "Reverse the default vertico view of LINES."
;; (move-overlay vertico--candidates-ov (point-min) (point-min))
;; ;; (setq lines (nreverse lines))
;; (unless (eq vertico-resize t)
;; (setq lines (nconc (make-list (max 0 (- vertico-count (length lines))) "\n") lines)))
;; (let ((string (apply #'concat lines)))
;; (add-face-text-property 0 (length string) 'default 'append string)
;; (overlay-put vertico--candidates-ov 'before-string string)
;; (overlay-put vertico--candidates-ov 'after-string nil)))
(provide 'prot-vertico)
;;; prot-vertico.el ends here

View file

@ -124,16 +124,16 @@ Else do `vertico-exit'."
(t
(vertico-exit))))
(cl-defgeneric vertico--display-candidates (lines)
"Reverse the default vertico view of LINES."
(move-overlay vertico--candidates-ov (point-min) (point-min))
;; (setq lines (nreverse lines))
(unless (eq vertico-resize t)
(setq lines (nconc (make-list (max 0 (- vertico-count (length lines))) "\n") lines)))
(let ((string (apply #'concat lines)))
(add-face-text-property 0 (length string) 'default 'append string)
(overlay-put vertico--candidates-ov 'before-string string)
(overlay-put vertico--candidates-ov 'after-string nil)))
;; (cl-defgeneric vertico--display-candidates (lines)
;; "Reverse the default vertico view of LINES."
;; (move-overlay vertico--candidates-ov (point-min) (point-min))
;; ;; (setq lines (nreverse lines))
;; (unless (eq vertico-resize t)
;; (setq lines (nconc (make-list (max 0 (- vertico-count (length lines))) "\n") lines)))
;; (let ((string (apply #'concat lines)))
;; (add-face-text-property 0 (length string) 'default 'append string)
;; (overlay-put vertico--candidates-ov 'before-string string)
;; (overlay-put vertico--candidates-ov 'after-string nil)))
(provide 'prot-vertico)
;;; prot-vertico.el ends here